load syntax
3 次查看(过去 30 天)
显示 更早的评论
I am using the following code to load a MAT file. It's not working. It works if I simply type Load 'C:\Data.mat' but if I use Load fname_ it wont work. Could you please tell me if I am missing anything in the code?
[FileName,PathName] = uigetfile('C:\Data.mat'); fname_=strcat(PathName,FileName); load -MAT fname_
0 个评论
采纳的回答
Arnaud Miege
2011-6-9
Use the function syntax rather than the command syntax:
load(fname_,'-mat')
HTH,
Arnaud
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!