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

 採用された回答

Mohammad Abouali
Mohammad Abouali 2015 年 12 月 8 日
編集済み: Mohammad Abouali 2015 年 12 月 8 日

0 投票

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 件)

カテゴリ

ヘルプ センター および File ExchangeWorkspace Variables and MAT Files についてさらに検索

タグ

質問済み:

2015 年 12 月 8 日

編集済み:

2015 年 12 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by