How to clear the memory occupied by matlab??
252 次查看(过去 30 天)
显示 更早的评论
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???
0 个评论
采纳的回答
Jan
2013-2-6
编辑:Jan
2013-2-6
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
2023-6-10
I have 64gb of RAM and still run out, there is no other way without turning off?
Matthew Creek
2023-8-24
Here are some links to related documentation:
更多回答(2 个)
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Performance and Memory 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!