From: Guillermo on
Hi,
I'm experimenting with variants of genetic programming.

I have built a routine that reads a set of variables and based on their value constructs an .M script file. I did this with the intention of running this dynamic .M file as a changing function that I could execute as I was iterating in the algorithm.

However, I found out that MATLAB reads the scripts once at the beginning of execution and does not update the .M files that might have been altered through the execution process. Therefore, regardless of how the .M script has changed, it really runs the first version all the time.

Is there a way to force MATLAB to reload a function stored in a specific .M file throughout the execution of the program? Other alternatives?

Thanks!
Guillermo