i have script
trdat=annrdat(1:id1);ntr=length(trdat);for i=1:4 a=(id2-(lidx(i))-ntr+1); b=id2-(lidx(i)); tridx(:,i)=annidx(a:b,i); clear a bendX=[ones(ntr,1) tridx(:,1) tridx(:,2) tridx(:,3)];Y=trdat;B=regress(Y,X);
Error: Subscript indices must either be real positive integers or logicals.
Best Answer