Matlab "save" and saving memory

3 visualizaciones (últimos 30 días)
med-sweng
med-sweng el 3 de Mzo. de 2013
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 comentarios
Image Analyst
Image Analyst el 3 de Mzo. de 2013
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 el 4 de Mzo. de 2013
@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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by