how do I freeze and save entire function state?
3 ビュー (過去 30 日間)
古いコメントを表示
Hi, I am running a large simulation (function with "children" functions), which takes a long time to produce data. when I need to debug an event which happens after a long time, I am running the simulation with same seed and under debug mode (breakpoints), and wait. my question - is there a way of saving the whole function data and memory to a file, so I can reproduce the situation again by just loading it somehow, instead of re-running the whole simulation?
thanks.
0 件のコメント
回答 (2 件)
Walter Roberson
2013 年 9 月 12 日
There is no provided mechanism to freeze and save function state.
It gets messy when you start involving objects (graphics or OOP), or open files, or threads, or additional processes (e.g, sound playing).
There is some back-tracking that can be done... but it only works on some kinds of functions if I recall.
Restoring the state would be tricky, especially as MATLAB has no way to restore a call stack.
0 件のコメント
Jan
2013 年 9 月 12 日
You can freeze a virtual machine. So install Matlab in a new virtual machine, freeze the complete state, create a copy of the state and start it as often as your want.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!