필터 지우기
필터 지우기

Clear all

조회 수: 4 (최근 30일)
Aadil
Aadil 2012년 4월 17일
I have long script which consumes a lot of memory, so part way through I have included the Clear All function to free up memory so it can continue.
But for some reason it doesn't Clear All the memory properly and ends up running out. When I split up the script and manually Clear All it works.
How can I insure it clears all the memory before proceeding to the next bit of script?
Thanks

채택된 답변

Jakob Sørensen
Jakob Sørensen 2012년 4월 17일
Can you plot the code around where you include the "Clear All"? Also, a bit of a long shot here, but you could try pause(1), to keep it from running like crazy.

추가 답변 (1개)

Image Analyst
Image Analyst 2012년 4월 17일
What does "Clear All the memory properly and ends up running out" mean? Running out of what? Running out of the function? Running out of memory (that can't be true if you just freed up a bunch)? Are you sure you didn't clear some variables that are necessary to run your code? How much memory are you talking about? Did you run the memory command? Why don't you set a breakpoint and figure out what is taking up so much memory when it runs out of memory and delete the big memory hogs that are not needed any longer?

카테고리

Help CenterFile Exchange에서 Variables에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by