Using a matrix of solution elements outside of ode45
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (2 件)
Mischa Kim
2016 年 12 月 10 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Numerical Integration and Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!