I have to load .mat file from a folder in my workspace. Can anyone tell me how to do so?

 Réponse acceptée

Mohammad Abouali
Mohammad Abouali le 8 Déc 2015
Modifié(e) : Mohammad Abouali le 8 Déc 2015

0 votes

load C:\myFolder\mySubFolder\myMatFile.mat
or
variableName= 'myVarName';
matfilePath = 'C:\myFolder\mySubFolder\myMatFile.mat';
data = load(matfilePath);
% to access the variable
data.(variableName);

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by