clearing memory during function runing

1 Ansicht (letzte 30 Tage)
Dany
Dany am 20 Nov. 2013
Beantwortet: E. Bisson am 20 Nov. 2013
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

Antworten (2)

Walter Roberson
Walter Roberson am 20 Nov. 2013
You can clear variables in the current function's workspace, or in the base workspace, or global variables.
  4 Kommentare
Laurent
Laurent am 20 Nov. 2013
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 am 20 Nov. 2013
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.

Melden Sie sich an, um zu kommentieren.


E. Bisson
E. Bisson am 20 Nov. 2013
You can use the clear command.
clear variable1 variable2

Kategorien

Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by