I have a variable that is holding a string (the string contains a path to a .mat file). However whenever I call load the variable I get an error saying "Error using load Unable to read file"
Here is my code where I call load:
fName = strcat(fName,'_features.mat');
display(fName);
load(fName);
For those curious fName = '/Users/MATLAB/10360453085_p2_features.mat'
Why am getting an error on load even though when I copy the value of fName into load it works perfectly fine, but using load(fName) gives me an error?
fName, before execution ofstrcat?imnames = {}fNameto create anfName. Are you sure that value offNamebeforestrcatis correct?loadshouldn't work either.