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

4 次查看(过去 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 CenterFile Exchange 中查找有关 Downloads 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by