load files whith a previus specified name

1 view (last 30 days)
hello all,
so, I want to load a file whose name is previously specified in a variable:
name= [(strcat('1beatrixresult Aplha=', num2str(alf), '- p=', num2str(pol)))]
load (name)
Now, matlab gives me an error:
Error using load
Unable to read file '1beatrixresult Aplha=0- p=1'. No such file or directory.
But I know that the file does exist. In fact if I writte it like this:
load ('1beatrixresult Alpha=0- p=1')
then matlab load the file without problem. Any idea of what could be causing this error and how can I fix it? thank you before hand
Beatriz Sanchez
Beatriz Sanchez on 19 Apr 2019
thank you very much, you're right about my akward way of name the files. However, It was just a typo in the name variable... thank you for you time

Sign in to comment.

Accepted Answer

Jos (10584)
Jos (10584) on 19 Apr 2019
Didn't you just make a simple typo?
% Aplha vs Alpha
% | |
  1 Comment
Beatriz Sanchez
Beatriz Sanchez on 19 Apr 2019
omg! and I never notied, even when I triple check that :-o
thank you

Sign in to comment.

More Answers (0)


Find more on Programming Utilities 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!