当我运行下面的代码,我得到了以下错误引用:错误:单元格内容从非单元阵列对象
Cell contents reference from a non-cell array object.
folder
可能需要1或多个文件夹
for x=1:numel(folder)
y{x} = fullfile(folder{x},'Status.xml');
getFile = fileread(char(y{x}));
content{x} = strtok(getFile ,';');
end
>>whos folder
Name Size Bytes Class Attributes
folder 1x1 941 struct
>> numel(folder)
ans=
1
也许在循环前初始化'y'为'y = {}'? – Dan
当你运行你的代码 – Shai
类型'>>哪个文件夹和'>>类(文件夹)'并且看到你得到的输出时,它似乎没有定义'文件夹'。 – Shai