how do i load a .mat file into matlab from my downloads folder after seeing if it exists or not, thanks

3 ビュー (過去 30 日間)
?

採用された回答

Walter Roberson
Walter Roberson 2013 年 2 月 23 日
matname = 'xyz.mat'; %for example
foldername = '/Users/people/stephen'; %for example
fullmatname = fullfile(foldername, matname);
if exist(fullmatname, 'file')
matfiledata = load(fullmatname);
else
error('.mat file must be stuck in traffic, is not here yet')
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDownloads についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by