second order ODE diff
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Zivile Dailidonyte
le 29 Oct 2018
Réponse apportée : Torsten
le 29 Oct 2018
Hello,

I have this second order ODE for damped oscillator. Easy way to solve it would be using ODE45 but I need to use MATLAB function 'diff' to obtain velocity and acceleration.
syms x(t) sin(t)
eq(t)=diff(x,t,t)+0.78*diff(x,t)+14*x==0.56*sin(t*147);
vel=diff(eq,t);
acc=diff(eq,t,t);
I've got to this point so far. But I can't work out what to do next or even if I'm on the right track.
Thanks
0 commentaires
Réponse acceptée
Torsten
le 29 Oct 2018
syms x(t)
eqn=diff(x,t,2)+0.78*diff(x,t)+14*x==0.56*sin(t*147);
xsol(t)=dsolve(eqn);
vel(t)=diff(xsol,t)
acc(t)=diff(xsol,t,2)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Ordinary Differential Equations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!