second order differential equation with variable coefficients
古いコメントを表示
I have to solve this differential equation: m*d^2x/dt^2 +k*x= F(x) where F(x) is known for points
採用された回答
その他の回答 (2 件)
Giuseppe Esposito
2017 年 8 月 8 日
Giuseppe Esposito
2017 年 8 月 8 日
0 投票
1 件のコメント
Torsten
2017 年 8 月 9 日
... and dxdt has to be a column vector:
function dxdt=myfun(t,x,m,k,Fc);
dxdt=zeros(2,1);
dxdt(1)=x(2);
dxdt(2)=(-k*x(1)+Fc(x(1)))/m;
end
Best wishes
Torsten.
カテゴリ
ヘルプ センター および File Exchange で Numerical Integration and Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!