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!