我試圖使用以下代碼:錯誤dsolve當變量被用一常數(R2011a)乘以
ode1='D2y1=-1256.4*y1-5*Dy1+255.1*y2+182.781';
ode2='D2y2=-151.5*y2-5*Dy2+255.1*y1-14.0459';
CI='y1(0)=2,y2(0)=-2,Dy1(0)=0,Dy2(0)=0';
sol=dsolve(ode1,ode2,CI,'t');
sol.y1
sol.y2
和MATLAB返回一個錯誤:
??? Error using ==> mupadengine.mupadengine>mupadengine.feval at 144 MuPAD error: Error: Division by zero [_invert];
during evaluation of 'stdlib::normalNoExpand'
Error in ==> dsolve>mupadDsolve at 215 T = feval(symengine,'symobj::dsolve',sys,x,ignoreConstraints);
Error in ==> dsolve at 96 sol = mupadDsolve(ignoreConstraints,varargin{1:narg});
Error in ==> maglevsol at 7 sol=dsolve(ode1,ode2,CI,'t');
然而,如果我運行這
ode1='D2y1=-y1-5*Dy1+255.1*y2+182.781';
ode2='D2y2=-y2-5*Dy2+255.1*y1-14.0459';
CI='y1(0)=2,y2(0)=-2,Dy1(0)=0,Dy2(0)=0';
sol=dsolve(ode1,ode2,CI,'t');
sol.y1
sol.y2
我沒有得到任何錯誤。 有什麼問題?我的版本是r2011a
你是不是想找到符號或數字解決方案? – madbitloman 2015-04-05 00:49:55
象徵性的解決方案 – questioner1234 2015-04-05 01:09:51