How to best load parameter values when using ode45 to simulate system of differential equations
1 回表示 (過去 30 日間)
古いコメントを表示
Kevin Bachovchin
2015 年 5 月 8 日
コメント済み: Kevin Bachovchin
2015 年 5 月 9 日
Hello,
I'm trying to simulate a large system of differential equations using ode45. I have a lot of parameter values (which are constants) that I need to load for this simulation, which I have stored in .mat files.
Is it most computationally efficient to load the .mat files inside the function handle called by ode45 or to load the .mat files before calling ode45 and then declare these parameters "global" values? Or is there some other way that is best to do it?
Right now, I'm loading the parameters inside the function handle, and it is taking a very long time to run. I'm wondering if it can be sped up by loading the parameters in a different way.
Thanks,
Kevin
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!