filename=uigetfile('*.mat;*.txt');
f=load(filename);
for i=1:1:numel(f)
b=f{i};
if strncmpi(b,'byb1',4)
xtm=b;
elseif strncmpi(a,'byb2',4)
xtc=b;
elseif strncmpi(a,'traindata',9)
xcm=b;
elseif strncmpi(a,'testdata',8)
xpc=b;
elseif strncmpi(a,'trainlab',8)
yc=b;
elseif strncmpi(f,'testlab',7)
yp=b;
end
end
[RMSEP,RMSEC,Ryu,MREyu,xre,yc,xpcm,yp1]=pdspls(xtm,xtc,xcm,xpc,yc,yp,0.01,handles.win,handles.lv);
报错:元胞内容引用自非元胞数组对象。提示我b={i}出错。
图片是我导入工作区里的mat文件,也就是变量f
这是哪里出错了?