Load .mat file from anyfolder

I have to load .mat file from a folder in my workspace. Can anyone tell me how to do so?

 Respuesta aceptada

Mohammad Abouali
Mohammad Abouali el 8 de Dic. de 2015
Editada: Mohammad Abouali el 8 de Dic. de 2015

0 votos

load C:\myFolder\mySubFolder\myMatFile.mat
or
variableName= 'myVarName';
matfilePath = 'C:\myFolder\mySubFolder\myMatFile.mat';
data = load(matfilePath);
% to access the variable
data.(variableName);

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 8 de Dic. de 2015

Editada:

el 8 de Dic. de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by