How can I make called my function stay in the memory so it can be efficiently run in loop?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello.
Let's say that I have a code which including for loop. In the loop, certain function is called at every round. How can I make it stay in the memory so code doesn't need to call it every time?
The function is complicated thus anonymous function is not suitable.
댓글 수: 0
답변 (1개)
James Tursa
2015년 11월 5일
편집: James Tursa
2015년 11월 5일
The first time you call a function it is parsed and put into memory. It will subsequently stay in memory unless you do something to clear it out of memory. You don't need to do anything special to get this to happen. E.g., see this:
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!