ODE45 for a System of Second-Order Equations
1 view (last 30 days)
Show older comments
I need to solve these equations and plot the solutions for theta(t) and phi(t) when 0<t<4. I'm not super familiar with ode45, can anybody help? Thank you
0 Comments
Answers (1)
Star Strider
on 8 Apr 2021
I didn’t see this earlier.
4 Comments
Star Strider
on 9 Apr 2021
My pleasure!
I cannot read that image, and obviously I cannot run the code to check it.
However the problem is likely that ‘eqnSystem’ needs to be presented to ode45 as:
[t,y] = ode45(@t,y)eqnSystem(t,y,theta,phi,omega_C), [0 4], initVals);
then:
figure
plot(t,y)
grid
legend(string(Subs))
to see the results.
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!