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
0 个评论
回答(2 个)
Jonathan Sullivan
2012-1-11
0 个投票
You are using your paging files. You have a few options:
- Buy more RAM
- Break up your operation into many steps
- Try to rewrite your code to clear variables after use, so as to decrease the memory requirements
1 个评论
Zied
2012-1-11
C.J. Harris
2012-1-11
0 个投票
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 个评论
Zied
2012-1-11
C.J. Harris
2012-1-11
Example:
h = figure;
set(h, 'Visible','off');
C.J. Harris
2012-1-11
Therefore ensure that if you set your figure to invisible you still close it. Following on from the example above:
close(h)
Zied
2012-1-11
C.J. Harris
2012-1-11
To show the figure again set its visiblity to true:
set(h, 'Visible','on');
Zied
2012-1-11
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!