problem of memory

I'm running a script to generate maps. At the end of processing, the memory that was allocated is not released and the process is completely blocked so I can not even save my outputs and i'm forced to exit Matlab. Do you have any solution for this?
Thanks in advance

Respuestas (2)

Jonathan Sullivan
Jonathan Sullivan el 11 de En. de 2012

0 votos

You are using your paging files. You have a few options:
  1. Buy more RAM
  2. Break up your operation into many steps
  3. Try to rewrite your code to clear variables after use, so as to decrease the memory requirements
C.J. Harris
C.J. Harris el 11 de En. de 2012

0 votos

Also ensure that if you are generating Matlab Figures (as an intermediate step) with the 'Visible' property set to false that you close them after use. I know this has caught me out in the past.

6 comentarios

Zied
Zied el 11 de En. de 2012
Thank you, do you know the command to set the Visible property to false?
C.J. Harris
C.J. Harris el 11 de En. de 2012
Example:
h = figure;
set(h, 'Visible','off');
C.J. Harris
C.J. Harris el 11 de En. de 2012
Therefore ensure that if you set your figure to invisible you still close it. Following on from the example above:
close(h)
Zied
Zied el 11 de En. de 2012
okay but i'm wondering how to open it in the end of the script??
C.J. Harris
C.J. Harris el 11 de En. de 2012
To show the figure again set its visiblity to true:
set(h, 'Visible','on');
Zied
Zied el 11 de En. de 2012
i will test this. Thanks a lot Chris

La pregunta está cerrada.

Preguntada:

el 11 de En. de 2012

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by