Using a matrix of solution elements outside of ode45
1 view (last 30 days)
Show older comments
I am working on a problem for a falling parachute where the forces are proportional to velocity squared. I am using ode45 which calls a function which includes the differential equations of motion. ode45 outputs to the main program time, distance, and velocity. Within the function, I have built a matrix which includes time, distance, velocity, glide path angle, and acceleration using persistent variables. I would like to use this complete matrix after ode45 has finished in the main program but I only get the variables for the last time period and not the whole matrix. How do I make the whole matrix from the function inside the ode45 loop available outside ode45 in the main program?
0 Comments
Answers (2)
Mischa Kim
on 10 Dec 2016
Duncan, how about simply re-building the matrix after the ode45-call? I assume all those variables are dependent on time, distance, and velocity.
For a more detailed analysis, please attach your code.
2 Comments
See Also
Categories
Find more on Numerical Integration and 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!