takeabyte
Joined: 14 Oct 2006 Posts: 2
|
Posted: October 14, 2006 9:45 AM Post subject: Program help.. |
|
|
I'm trying to write a program that will evaluate a function by entering the function and the value(s) to replace the variables. Ex:
| Code: |
Request "f(x)=", f
Request "x0=",x0
expr(f)->ff
expr(x0)->x0
x0->x
Disp ff
|
That will evaluate the entered function at x0. BUT, I want to do this in a loop (trying to program Newton's method for a system of 2 eqs), so after each iteration, I need to set x BACK to a variable, but when I try, x just goes back to x0 (if i set x->x, it's obvious, since x is already x0)
I tried assigning x to another variable and locking it, but no luck. I get the same problem. Ex:
| Code: |
...expr(x0) ->x0
x-> varx
Lock varx
x0->x
Disp ff (shows evaluated function)
var1->x
|
Anybody know how I could set x back to good old 'ex'? |
|