小编Vic*_*ast的帖子

matlab strcat不返回字符串?

imgstr无法识别strcat的输出字符串.

homedir = 'C:\Users\...\images\';
for img = {'01.bmp', '02.bmp', '03.bmp'}
  imgstr = strcat(homedir, img)
  I = imread(imgstr);
end;
Run Code Online (Sandbox Code Playgroud)

输出:

imgstr = 'C:\Users...\images\01.bmp'
Error using imread>parse_inputs (line 477)
The filename or url argument must be a string.
Run Code Online (Sandbox Code Playgroud)

strcat应该返回一个字符串,而不是一个char数组,因为我的输入是字符串.不应该吗?

string matlab

4
推荐指数
1
解决办法
5027
查看次数

标签 统计

matlab ×1

string ×1