필터 지우기
필터 지우기

workspace of anonymized/memoized subfunctions and nested functions

조회 수: 1 (최근 30일)
Patrick Mboma
Patrick Mboma 2014년 11월 2일
편집: Matt J 2014년 11월 2일
Dear all,
Is there any way to have control over the variables entering the workspace of an anonymous function? I have been experiencing some slowness lately and when I check the workspace of some of the anonymous or memoized functions I created, they contain more information that I want them to.
If the function refers to a subfunction, it contains all the information in the main function as well. Needless to say, it is the same for nested functions.
Any ideas?

채택된 답변

Matt J
Matt J 2014년 11월 2일
편집: Matt J 2014년 11월 2일
You can try the following tool
but read the disclaimers.
Anonymous/nested functions can only slow things down when you try to export handles to them from the workspace where they were created. Either you're returning the handle from a function, saving it to a .mat file, or sending it to a parfor worker.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Performance and Memory에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by