Load .mat file from anyfolder

6 visualizzazioni (ultimi 30 giorni)
rihab
rihab il 8 Dic 2015
I have to load .mat file from a folder in my workspace. Can anyone tell me how to do so?

Risposta accettata

Mohammad Abouali
Mohammad Abouali il 8 Dic 2015
Modificato: Mohammad Abouali il 8 Dic 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);

Più risposte (0)

Categorie

Scopri di più su Workspace Variables and MAT-Files in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by