second order differential equation with variable coefficients
Mostrar comentarios más antiguos
I have to solve this differential equation: m*d^2x/dt^2 +k*x= F(x) where F(x) is known for points
Respuesta aceptada
Más respuestas (2)
Giuseppe Esposito
el 8 de Ag. de 2017
Giuseppe Esposito
el 8 de Ag. de 2017
0 votos
1 comentario
Torsten
el 9 de Ag. de 2017
... 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.
Categorías
Más información sobre Numerical Integration and Differential Equations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!