- #1
Niles
- 1,866
- 0
Hi
I have a long procedure, which calculates the potential of a physical system. The procedure returns something having the form
where z is a variable. Now, I need to evaluate potential at different z. I can of course do something like
and so on, but is there a better way to do this without having to rewrite the procedure? I'm thinking about having something like potential[z], but that is perhaps too late for me to use this, without having to rewrite the whole thing?
Thanks for any help.
Niles.
I have a long procedure, which calculates the potential of a physical system. The procedure returns something having the form
Code:
potential = 1/(constant + z)
Code:
z = 1;
potential
z=2;
potential
Thanks for any help.
Niles.