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

0 Stimmen

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

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by