imgstr can’t recognize the output string from strcat.
homedir = 'C:\Users\...\images\';
for img = {'01.bmp', '02.bmp', '03.bmp'}
imgstr = strcat(homedir, img)
I = imread(imgstr);
end;
outputs:
imgstr = 'C:\Users...\images\01.bmp'
Error using imread>parse_inputs (line 477)
The filename or url argument must be a string.
strcat should be returning a string, not a char array, since my inputs are strings. Shouldn’t it?
Your problem is with how MATLAB iterates over cell arrays. Here’s a related question/answer.
Inside the loop add a
{1}to extract the char array, and it should work: