Load .mat file from anyfolder

5 Ansichten (letzte 30 Tage)
rihab
rihab am 8 Dez. 2015
Bearbeitet: Mohammad Abouali am 8 Dez. 2015
I have to load .mat file from a folder in my workspace. Can anyone tell me how to do so?

Akzeptierte Antwort

Mohammad Abouali
Mohammad Abouali am 8 Dez. 2015
Bearbeitet: Mohammad Abouali am 8 Dez. 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);

Weitere Antworten (0)

Kategorien

Mehr zu Workspace Variables and MAT-Files finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by