How can I make called my function stay in the memory so it can be efficiently run in loop?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
James Tursa
el 5 de Nov. de 2015
Editada: James Tursa
el 5 de Nov. de 2015
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 comentarios
Ver también
Categorías
Más información sobre Get Started with MATLAB en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!