當我運行下面的代碼,我得到了以下錯誤引用:錯誤:單元格內容從非單元陣列對象
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