unable to load a mat file from the current directory in to workspace using a variable file name
1 view (last 30 days)
Show older comments
I'm using matlab13. Trying to put a line of code in my script that will load a variable mat file name when run, but shows up with errors. load('ac_eef12_fl04_*.mat') I also cannot perform this in my command window. It works when the file name is identical, not variable with an asterisk. Thank you!
1 Comment
Stephen23
on 18 Sep 2018
"It works when the file name is identical, not variable with an asterisk"
There is nothing in the MATLAB documentation to indicate that load should work with an asterisk in the filename. Inventing syntaxes and hoping that they will work is a very inefficient way to write code. It is much more efficient to read the documentation, to learn how MATLAB actually works:
Answers (1)
See Also
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!