- Use SAVE and LOAD to save the data in a MAT-file, and to re-load it later into MATLAB for plotting.
- Collect the x's and f(x)'s in cell arrays, where the index can indicate the loop iteration in which they were generated.
I want to save an array which change its size at each iteration in a loop so that I can plot later on
1 次查看(过去 30 天)
显示 更早的评论
I am working with adaptive mesh which change its size and hence solution size in a loop. I want to save this adaptive mesh say x and function f(x) in a file inside the loop (in Matlab) so that I can plot how x and f(x) change during the loop. Pls. help me out. Thanks in advance !!
0 个评论
回答(1 个)
Yannick
2013-10-19
编辑:Yannick
2013-10-19
Hi, you can do a few things:
The second option is probably best as long as you don't run out of memory. If that's the case, then using files to periodically save the data will help. And depending on exactly what you want to achieve, yet other methods can be preferable, but that depends on the specifics of your application. For example, how to import/export data from files.
Hope this help!
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!