Question on the use of function 'load' to open a *.mat file
Mostrar comentarios más antiguos
I have multiple *.mat files. So the filename is generated in a loop as below:
File = ['hb', num2str(A(i)), '.mat'];
When I tried to load it by doing:
load File;
I got the below error:
Error using load
Unable to read file 'File': no such file or directory.
Error in Combine_matfiles (line 17)
load File;
I am 100% sure the generated filename, File is correct, and the file is right there in the same directory. I can open it by typing load with the file name in the command window without any problem.
What did I do wrong? Thanks.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Workspace Variables and MAT Files en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!