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_

 Akzeptierte Antwort

Arnaud Miege
Arnaud Miege am 9 Jun. 2011

0 Stimmen

Use the function syntax rather than the command syntax:
load(fname_,'-mat')
For more details on the function vs. command syntax, see the documentation.
HTH,
Arnaud

Weitere Antworten (0)

Kategorien

Mehr zu Performance and Memory finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by