From: Adeline CARNIS Date: Mon, 30 Sep 2013 08:27:47 +0000 (+0200) Subject: Replace ^ by .^ in dae demos. X-Git-Tag: 5.5.0-beta-1~41 X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=7d91687187135c4307d22826fd086f518b12740d Replace ^ by .^ in dae demos. Change-Id: I3040ed63ee2b6981e78223436aa374d96c71ce1c --- diff --git a/scilab/modules/differential_equations/demos/dae/dae2/pendg.sci b/scilab/modules/differential_equations/demos/dae/dae2/pendg.sci index f244441..cc3d8ee 100644 --- a/scilab/modules/differential_equations/demos/dae/dae2/pendg.sci +++ b/scilab/modules/differential_equations/demos/dae/dae2/pendg.sci @@ -14,8 +14,8 @@ function [res,ires]=pendg(t,y,ydot) 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; @@ -49,7 +49,7 @@ function H=build_sliding_pendulum () //the curve vx=[xmin:0.1:xmax]'; - vy=vx^2; + vy=vx.^2; xpoly(vx,vy,"lines") c=gce(); c.foreground=5;