Is there a way to free RAM consumed by Matlab without closing Matlab?

59 ビュー (過去 30 日間)
Carlos
Carlos 2013 年 2 月 20 日
編集済み: Ibrahim Guler 2021 年 3 月 29 日
Hi,I am working with a program which is consuming a huge amount of RAM memory, and I would like to know if it is possible to free RAM memory consumed by Matlab(64 bit Windows Matlab)after executing this program and without closing matlab or using the clear command( which does not work in this case).
I have been going through some previous answers, and I cannot find a clear answer to my question. So any input is interesting for me.
Thank you in advance.

回答 (5 件)

Michael Melnychuk
Michael Melnychuk 2018 年 12 月 29 日
I am blown away at how bad MatLab is at handling memory. I have gone through what you have all gone through (many times) and there are no solutions to something so basic. One of the main devs went so far as to blame it on Mac OS. Amazing how every other app on my computer can manage memory effectively but somehow MatLab can't. The only solution I've found is to save all the figures and variables you've been working on and restart the program. Great solution. My advice would be if you're not overly invested to start using Python.
  1 件のコメント
Jan
Jan 2018 年 12 月 29 日
編集済み: Jan 2019 年 1 月 2 日
@Michael: You did not mention what your actual problem is. The general claim, that Matlab is "bad" at handling memory is neither useful nor clear.

サインインしてコメントする。


Walter Roberson
Walter Roberson 2013 年 2 月 20 日
"clear" and "pack" are the only two commands that have a chance of working.
  1 件のコメント
Carlos
Carlos 2013 年 2 月 21 日
My conclusion from my previous experience in Matlab was that "clear" and "pack" are the only two commands that could help in my case(even though I knew they did not work in my particular case because I had used those commands previously without any success), however in some answers I read some confusing answers andI wanted some expert advice. Thank you Walter.

サインインしてコメントする。


Matt J
Matt J 2013 年 2 月 20 日
編集済み: Matt J 2013 年 2 月 20 日
You might try setting the big variables to [], to see if that makes a difference.
Or, overwrite the old big variables with the new big ones.
new=old; clear old
new(index)=...

Michael Melnychuk
Michael Melnychuk 2018 年 12 月 30 日
This comment is not meant for you Jan, it's meant for all the people that search this same issue with no solution to be found. It's a distant early warning to avoid MatLab. I've used MatLab only becuase is has previously been standard in my academic department, but there is a massive movement away from MatLab and toward Python and I'm letting new people know that this is a dying platform that inhibits research and that Python is free, and that if you are just learning to code don't waste your time with it, learn python. It has all the same funcstionality, massive developer support, and much much better graphics.. All the best to you.
  3 件のコメント
FERHAT YILMAZ
FERHAT YILMAZ 2020 年 6 月 23 日
@Michael is right. You cannot compare Matlab with other programs such that Chome, Firefox etc. It is a COMPUTATION tool and there is no any memory handling functionality. Let me say another ironic issue; i started Matlab and i didn't do any computation. Only started "parallel pool" and surprise! It ate above 1.5GB memory. It is so awful. What do you expect? I would say, i need a server computer with 128GB RAM to make computation on Matlab comfortably.. Foolish..
Ibrahim Guler
Ibrahim Guler 2021 年 3 月 29 日
編集済み: Ibrahim Guler 2021 年 3 月 29 日
Python does not have a powerful toolboxes as MATLAB has such as LTE, 5G, DSP, Communication, etc. You can't compare it in that way.

サインインしてコメントする。


André Brás
André Brás 2017 年 11 月 27 日
Hey there!
Did you find solution for your problem? I'm fighting with the same error...
Best regards.

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by