Change-Id: I3040ed63ee2b6981e78223436aa374d96c71ce1c
xp = ydot(1:3);
up = ydot(4:6);
res(1:3) = xp-u;
- res(4) = (M+m)*up(1)+m*l*cos(x(3))*up(3)-m*l*sin(x(3))*u(3)^2+lambda*fx(x(1),x(2))+k*u(1);
- res(5) = (M+m)*up(2)+m*l*sin(x(3))*up(3)+m*l*cos(x(3))*u(3)^2+(M+m)*g+lambda*fy(x(1),x(2))+k*u(2);
+ res(4) = (M+m)*up(1)+m*l*cos(x(3))*up(3)-m*l*sin(x(3))*u(3).^2+lambda*fx(x(1),x(2))+k*u(1);
+ res(5) = (M+m)*up(2)+m*l*sin(x(3))*up(3)+m*l*cos(x(3))*u(3).^2+(M+m)*g+lambda*fy(x(1),x(2))+k*u(2);
res(6) = m*l*cos(x(3))*up(1)+m*l*sin(x(3))*up(2)+m*l^2*up(3)+m*g*sin(x(3));
res(7) = -(fx(x(1),x(2))*u(1)+fy(x(1),x(2))*u(2));
ires = 0;
//the curve
vx=[xmin:0.1:xmax]';
- vy=vx^2;
+ vy=vx.^2;
xpoly(vx,vy,"lines")
c=gce();
c.foreground=5;