您好我通过以下脚本获得此错误 -
剧本:
fid = fopen('TR2.roi', 'r');
test = []; % test variable for holding current line from text file
while isempty(test)
fline = fgetl(fid);
disp('b');
test = strmatch('; Number of',fline);
end
错误:
Error using fgets
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in fgetl (line 36)
[tline,lt] = fgets(fid);
Error in test1 (line 6)
fline = fgetl(fid);
任何解决方案和原因导致此错误?我已经验证了我的fid是> 2.