Load .mat file from anyfolder

10 visualizaciones (últimos 30 días)
rihab
rihab el 8 de Dic. de 2015
Editada: Mohammad Abouali el 8 de Dic. de 2015
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
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

Más información sobre Workspace Variables and MAT-Files en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by