TI-89 HomeGames ArchiveTitanium GamesGames How ToProgramsFAQForumTI-89 WikiLinks

Program help..

 
Post new topic   Reply to topic    Your TI-89 Resource Forum Index -> BASIC Programming
Author Message
takeabyte



Joined: 14 Oct 2006
Posts: 2

PostPosted: October 14, 2006 9:45 AM    Post subject: Program help.. Reply with quote

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'?
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger AIM Address
bostonvaulter



Joined: 13 Oct 2006
Posts: 43
Location: USA

PostPosted: October 14, 2006 2:58 PM    Post subject: Reply with quote

perhaps delvar x?
Back to top
View user's profile Send private message
takeabyte



Joined: 14 Oct 2006
Posts: 2

PostPosted: October 14, 2006 6:12 PM    Post subject: Reply with quote

an amazingly simple solution..can't believe i missed that! Thanks a million, you're my hero =)
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger AIM Address
Display posts from previous:    View previous topic : View next topic  
Post new topic   Reply to topic    Your TI-89 Resource Forum Index -> BASIC Programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Contact Us | Privacy Policy | Disclaimer | Trademarks

Copyright ©2006 All rights reserved.


Free Greeting Cards | Girly Myspace Layouts | Myspace Unblocker |