Load .mat file from anyfolder
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
rihab
le 8 Déc 2015
Modifié(e) : Mohammad Abouali
le 8 Déc 2015
I have to load .mat file from a folder in my workspace. Can anyone tell me how to do so?
0 commentaires
Réponse acceptée
Mohammad Abouali
le 8 Déc 2015
Modifié(e) : Mohammad Abouali
le 8 Déc 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);
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Workspace Variables and MAT-Files dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!