写了一个简单的代码,运行中总是提示在第6行出错,提示“Filename must be a string.”
想谢老师能给予一点提示或帮助,谢谢!
%script file test.m
filename={'book1.xls','book2.xls'};
filename(1)
filename(2)
for i=1:2
AA=xlsread(filename(i),'sheet1','c1:c38');
norm_judge(AA,0.05);
end
把filename(i)改为filename{i},也就是把圆括号改为花括号即可。