TI-89 HomeGames ArchiveTitanium GamesGames How ToProgramsFAQForumTI-89 WikiLinks

Drawfunc limits?

 
Post new topic   Reply to topic    Your TI-89 Resource Forum Index -> General Discussion
Author Message
jagboy



Joined: 04 May 2007
Posts: 2

PostPosted: May 4, 2007 8:09 PM    Post subject: Drawfunc limits? Reply with quote

We are doing a drawing project in math and I need to know how to put limits on functions. On the 83's it's like this: DrawF x^2/(x<2)(x>-4). Any ideas? I know it's a simple question and the project isn't exactly full of mathematic intensity but it's required.

JB
Back to top
View user's profile Send private message
mellamokb



Joined: 10 May 2007
Posts: 124

PostPosted: May 10, 2007 3:19 PM    Post subject: Reply with quote

There are two options for implementing constraints on the TI-89. You can use the with bar ("|") like this (on the home screen):

Define y1(x) = 3x^2|2<x and x<3

on the regular 89 or

Define y1(x) = 3x^2|2<x<3

on the 89 Titanium (with AMS 3.10 or higher)

If you view the graph, you will see 3x^2 drawn only where x is between 2 and 3.

You can also use the 'When(' command, which is commonly used for step functions. The syntax of the 'When' command is

When(expression-to-test, value-if-true, value-if-false)

So if I typed "When(5>3, 2, 4)" on the homescreen, the calculator would output 2 because 5>3 is indeed true. I could rewrite my original equation using the 'When' function like this:

Define y1(x) = When(2<x and x<3, 3x^2, undef)

or with a TI89 Titanium with AMS 3.10 or higher:

Define y1(x) = When(2<x<3, 3x^2, undef)

Basically, this means the function should display 3x^2 only when x is between 2 and 3; otherwise, the function is undefined (and so wouldn't show up in a graph or be evaluated in a formula).

Hope this helps,

~ mellamokb
Back to top
View user's profile Send private message
jagboy



Joined: 04 May 2007
Posts: 2

PostPosted: May 12, 2007 7:58 PM    Post subject: Reply with quote

Awesome! I just tried it and it worked! For some reason when using a drawfunc command in a program, using the "l" method doesn't work. Using "when(" worked flawlessly. I can't thank you enough.


JB
Back to top
View user's profile Send private message
mellamokb



Joined: 10 May 2007
Posts: 124

PostPosted: May 17, 2007 9:27 AM    Post subject: Reply with quote

Glad to help, JB! I don't have my calculator with me, so I probably got the syntax wrong for the "|" command.

~ mellamokb
Back to top
View user's profile Send private message
Display posts from previous:    View previous topic : View next topic  
Post new topic   Reply to topic    Your TI-89 Resource Forum Index -> General Discussion 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 |