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!