Matlab "save" and saving memory

3 次查看(过去 30 天)
med-sweng
med-sweng 2013-3-3
For example, I'm trying to run a program, and since I'm having a while-loop in that program where in each iteration a new empty matrix will be created, the program takes a long time to get the results and since an image has to be read many times no result is returned and matlab freezes. A workaround I was recommended to do is using `save` in `matlab`.
A question here is, how can `save` fix me that issue which seemed to be complex at the beginning? What is it really doing behind the scenes to improve the performance like that?
I saw the documentation about what `save` does, but still, not getting the point of the secret of the performance improvement?
Can you kindly explain to me what is really happening there?
Thanks.
  2 个评论
Image Analyst
Image Analyst 2013-3-3
I was going to ask you the same thing. I still don't know why you can just put save() in the loop. What's the problem? (In more detail please, like some code...) http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
Jan
Jan 2013-3-4
@med-sweng: It is not clear what you are asking for, because we do not know the program. The only information we have is that it contains a WHILE loop and an empty matrix is created. Please post any relevant information, e.g. the code itself would be really helpful.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by