How do I save the entire workspace through an ode function call?
显示 更早的评论
I am working in command line mode --- with nodisplay, nojwm, nosplash, and no desktop mode
I would like to record how variables change during a call to ode45. I want the entire sequence rather than just the final values.
I see the save command but what is the format of the file produced?
回答(3 个)
Jan
2014-7-1
The format of the save command is explained in detail here:
doc save
The description is not clear: "record how variables change". Which variables? What does "during a call" exactly mean? Inside of before versus after?
James Tursa
2014-7-1
0 个投票
If A is not too large and you don't have too many iterations, you might consider just storing them in memory and then saving later. E.g., put the A iterations in a global cell array with each iteration being one of the cells. Ordinarily I might have suggested a 3D array to hold the results, but that is not going to work very well if A is sparse (data copying issues with each iteration).
类别
在 帮助中心 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!