马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
降阶以后的系统微分方程如下:
dx=[x(2);fx/M+md*cos(tao+fai);x(4);fy/M+md*sin(tao+fai)-G]; % x=x(1) x'=x(2) y=x(3) y'=x(4)
以下为系统里需要加入的非线性力
fx=(sqrt((x(1)-2*x(4))^2+(x(1)+2*x(2))^2)/(1-x(1)^2-x(3)^2))*(3*x(1)*V-G1*sin(a)-2*S*cos(a))+(RC/L^2)*(8*pi/sqrt(x(1)^2+x(3)^2))*(1-1/sqrt(1-x(1)^2-x(3)^2))*cos(a);
fy=(sqrt((x(1)-2*x(4))^2+(x(1)+2*x(2))^2)/(1-x(1)^2-x(3)^2))*(3*x(3)*V-G1*cos(a)-2*S*sin(a))+(RC/L^2)*(8*pi/sqrt(x(1)^2+x(3)^2))*(1-1/sqrt(1-x(1)^2-x(3)^2))*sin(a);
非线性力中所需的参数
V=(2+(X(3)*cos(a)-x(1)*sin(a))*G1)/(1-x(1)^2-x(3)^2);
S=(x(1)*cos(a)+x(3)*sin(a))/(1-(x(1)*cosa+x(3)*sin(a))^2);
G1=(2/sqrt(1-x(1)^2-x(3)^2))*(pai/2+atan((x(3)*cos(a)-x(1)*sin(a))/(1-x(1)^2-x(3)^2)));
a=atan((x(3)+2*x(2))/(x(1)-2*x(4)))-(pi/2)*sin((x(3)+2*x(2))/(x(1)-2*x(4)))-(pai/2)*sin(x(3)+2*x(2));
直接用ODE求解总会报错,
??? At compilation, "fx" was determined to be a variable and this
variable is uninitialized. "fx" is also a function name and previous versions of MATLAB would have called the
function.
However, MATLAB 7 forbids the use of the same name in the same
context as both a function and a variable.
Error in ==> ymwd at 3
dx=[x(2);fx/M+md*cos(tao+fai);x(4);fy/M+md*sin(tao+fai)-G]; % x=x(1) x'=x(2) y=x(3) y'=x(4)
Error in ==> odearguments at 111
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ==> ode45 at 173
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
这类方程该怎么用matlab解?请高手帮帮忙啊 ,好几天了,一直纠结这个上面 |