求助,matlab中的积分问题
t=0:0.01:1;%disp(t);x=(1-t).^3.*p0(1)+3*t.*(1-t).^2*p1(1)+3*t.^2.*(1-t)*p2(1)+t.^3.*p3(1);%disp(x);
y=(1-t).^3.*p0(2)+3*t.*(1-t).^2*p1(2)+3*t.^2.*(1-t)*p2(2)+t.^3.*p3(2);%disp(y);
plot(x,y,'r');
for i = 1:101
dx=-3*(1-t).^2*p0(1)+(9*t-12*t+3)*p1(1)+(6*t-9*t.^2)*p2(1)+3*t.^2*p3(1);
dy=-3*(1-t).^2*p0(2)+(9*t-12*t+3)*p1(2)+(6*t-9*t.^2)*p2(2)+3*t.^2*p3(2);
dz(i)=sqrt((dx(i)).^2+(dy(i)).^2);fprintf('dz(%d)=%f\n',dz(i));
dz(i)=sqrt((dx(i)).^2+(dy(i)).^2)
fun=@(dz)dz(i);
s=integral(fun,x(0),x(101));fprintf('s(%d)=%f\n',i,s(i));
出错 ywsj3 (line 117)
s=integral(fun,x(0),x(101));fprintf('s(%d)=%f\n',i,s(i));
问大神怎么解决?