z这个程序该如何修改才能运行?????
function pp=bspline(t,window)k=length(t)-1;
if(k>1)
adds=ones(1,k-1);
tt=[adds*t(1) t(:)'adds*t(k+1)];j=k+1;
a=[adds*0 1adds*0];
inter=find(diff(tt)>0);1=length(inter);
tx=ones(1,1)*[2-k:k-1]+inter'*ones(1,k);b(:)=a(b);
c=sprpp(tx,b);x=[tt(inter) tt(2*k)];
else
1=1;x=t;c=1;
end
if nargout>0,pp=ppmak(x,c,1);return,end
step=100;xx=x(1)+[-10:step+10]*(x(1+1)-x(1))/step;nstep=length(xx);
ifnargout>1subplot(2,2,window),end
xxx=[xx(1) xx(nstep)];yyy=[-1,2];
plot(xxx,yyy,'.b'),axis([xxx,yyy]),grid off,hold on
bspl=spval(spmak(t,1),xx);plot(xx,bspl,'k','linew',2)
for j=1:(k+1),plot(t[j j],yyy),end
temp=find(xx>=x(1));jh=temp(1);
jsmax=5;js=jsmax;co=['r','g','k','m','b'];
forj=1:1;js=js+1;if(js>jsmax),js=1;end
j1=jh;temp=find(xx>=x(j+1));jh=temp(1);
pval=polyval(c(j),:),xx-x(j));
plot(xx,pval,co(js));plot(xx(j1:jh)),bspl(j1:jh),co(js),'linew',1.3)
end
pause
hold off
??? Error: File: C:\MATLAB6p5\work\bspline11.m Line: 5 Column: 24
Missing operator, comma, semicolon, or white space.