second order differential equation with variable coefficients
Ältere Kommentare anzeigen
I have to solve this differential equation: m*d^2x/dt^2 +k*x= F(x) where F(x) is known for points
Akzeptierte Antwort
Weitere Antworten (2)
Giuseppe Esposito
am 8 Aug. 2017
Giuseppe Esposito
am 8 Aug. 2017
0 Stimmen
1 Kommentar
Torsten
am 9 Aug. 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.
Kategorien
Mehr zu Numerical Integration and Differential Equations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!