问题描述:
单摆微分方程求解:x''+(g/l)sin(x)=0,用Matlab求解,
function dphi=Pendel_DGL(t,x)
g= 9.81;
l= 1;
dphi_1=x(2);
dphi_2=-g/l*sin(x(1));
dphi= [dphi_1;dphi_2];
[t,x]=ode45(Pendel_DGL,[0,4],[pi/2,0])
我觉得思路没有错误呀
function dphi=Pendel_DGL(t,x)
g= 9.81;
l= 1;
dphi_1=x(2);
dphi_2=-g/l*sin(x(1));
dphi= [dphi_1;dphi_2];
[t,x]=ode45(Pendel_DGL,[0,4],[pi/2,0])
我觉得思路没有错误呀
问题解答:
我来补答展开全文阅读