How to clear the memory occupied by matlab??

조회 수: 263 (최근 30일)
Bless
Bless 2013년 2월 6일
댓글: Matthew Creek 2023년 8월 24일
I'm working in matlab GUI and it occupies more memory and cause out-of-memory error. Even if I clear all the variables by clearvars, the memory remains
>> memory
Maximum possible array: 11 MB (1.112e+007 bytes) *
Memory available for all arrays: 267 MB (2.799e+008 bytes) **
Memory used by MATLAB: 1477 MB (1.548e+009 bytes)
Physical Memory (RAM): 2766 MB (2.900e+009 bytes)
Could anyone help me how to flush out the memory used by MATLAB???

채택된 답변

Jan
Jan 2013년 2월 6일
편집: Jan 2013년 2월 6일
See pack.
More powerful:
!matlab &
exit
But when diskswapping was used intensively even restarting Matlab can leave the operating system in a state of a reduced responsiveness. Then use the most powerful FEX: WinPower:
WinPower('RebootMatlab', 'disp(''Hello again'')');
This restarts the computer...
  댓글 수: 2
Jorge Ignacio Cisneros Saldana
Jorge Ignacio Cisneros Saldana 2023년 6월 10일
I have 64gb of RAM and still run out, there is no other way without turning off?

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Sean de Wolski
Sean de Wolski 2013년 2월 6일
See the memory management tips linked from the bottom of:
doc memory

Christian Schwermer
Christian Schwermer 2020년 8월 16일
Hello,
MATLAB doesn't release memory, if you didn't declare the variable as output for the function.
best regards
  댓글 수: 1
Eric Bodenchak
Eric Bodenchak 2022년 4월 30일
what variable? for what function? Can you be more specific?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Performance and Memory에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by