dsolve() function yielding errors
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Have been trying to solve the following equation for some time, but when I run the same it yields some errors which I'm unable to understand.
inits='x(0)=0,r(0)=0,s(0)=0,q(0)=0';
eqn1='40000*x-20000*s-20000*q+500*Dx-250*Ds-250*Dq+750*D2x=0';
eqn2='90000*r+30000*s-30000q+1125*Dr+375*Ds-375*Dq+1000*D2r=0';
eqn3='-20000*x+30000*r+220000*s-250*Dx+375*Dr+250*Ds+35*D2s=2000000';
eqn4='-20000*x+30000*r+220000*q-250*Dx+375*Dr+250*Dq+35*D2q=2000000';
[x,r,s,q]=dsolve('eqn1','eqn2','eqn3','eqn4',inits);
This is yielding the following error
Error using symengine (line 58)
Could not extract differential variables to solve for. Use 'solve'
or 'vpasolve' to compute the solutions of non-differential
equations.
Error in mupadengine/feval (line 155)
symengine('error',S(8:find(S=='[',1)-2));
Error in dsolve>mupadDsolve (line 325)
T = feval(symengine,'symobj::dsolve',sys,x,options);
Error in dsolve (line 186)
sol = mupadDsolve(args, options);
Error in Pitch_equation_of_motion_solve (line 6)
[x,r,s,q]=dsolve('eqn1','eqn2','eqn3','eqn4',inits);
0 Kommentare
Antworten (1)
Torsten
am 5 Feb. 2015
1. Define x(t),r(t),s(t),q(t) as symbolic
2. Use "==" instead of "=" in the definition of the equations
3. Use diff(x), diff(r), diff(s), diff(q) instead of Dx, Dr, Ds, Dq.
Best wishes
Torsten.
9 Kommentare
Torsten
am 10 Feb. 2015
Last attempt:
syms x(t) r(t) s(t) q(t)
Dx=diff(x);
Dr=diff(r);
Ds=diff(s);
Dq=diff(q);
D2x=diff(x,2);
D2r=diff(r,2);
D2s=diff(s,2);
D2q=diff(q,2);
[X,R,S,Q]=dsolve(40000*x-20000*s-20000*q+500*Dx-250*Ds-250*Dq+750*D2x==0,90000*r+30000*s-30000q+1125*Dr+375*Ds-375*Dq+1000*D2r==0,-20000*x+30000*r+220000*s-250*Dx+375*Dr+250*Ds+35*D2s==2000000,-20000*x+30000*r+220000*q-250*Dx+375*Dr+250*Dq+35*D2q==2000000,Dx(0)==0,Dr(0)==0,Ds(0)==0,Dq(0)==0,x(0)==0,r(0)==0,s(0)==0,q(0)==0);
Best wishes
Torsten.
Siehe auch
Kategorien
Mehr zu Special Values finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!