Recently I came to know that it is not a good idea to use
So, I started using
Now, I am wondering what I should do to clear only the persistent variables that I use inside my functions. It is absolutely critical that I clear the persistent states of my adaptive algorithms. Is there a way I can clear only persistent variables so that I don't have to re-run the entire script to generate the same data only to be used in a differently initialized algorithm?
Currently, I do this by calling the particular function with a
to clear the persistent variables or re-initialize them. Is it the best way? Your comments will help,