필터 지우기
필터 지우기

clearing memory during function runing

조회 수: 2 (최근 30일)
Dany
Dany 2013년 11월 20일
답변: E. Bisson 2013년 11월 20일
Hi, im runing a function that uses a lot of memory and sometimes the function stops because there is not enough memory. is it possible to clear variables during running in order to free some memory?
thank you

답변 (2개)

Walter Roberson
Walter Roberson 2013년 11월 20일
You can clear variables in the current function's workspace, or in the base workspace, or global variables.
  댓글 수: 4
Laurent
Laurent 2013년 11월 20일
But PACK cannot be used from within a function, so it will not solve memory problems during running of the function.
Walter Roberson
Walter Roberson 2013년 11월 20일
Correct. But sometimes it makes sense to "checkpoint" your current state, return back up some levels, clean up memory, and then restart from the checkpoint.

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


E. Bisson
E. Bisson 2013년 11월 20일
You can use the clear command.
clear variable1 variable2

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by