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_