TI-89 HomeGames ArchiveTitanium GamesGames How ToProgramsFAQForumTI-89 WikiLinks

TI-89 Programming Help

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



Joined: 21 Jan 2009
Posts: 1

PostPosted: January 21, 2009 10:32 PM    Post subject: TI-89 Programming Help Reply with quote

Ok I have been programming on the TI-83 and the TI-84 since 7th grade and I was fairly good at it. However, I just bought the TI-89 Titanium and was trying to make a simple Program to calculate the Four Forms of a line and I am having a little trouble. Here is my Code

Code:
:fourform()
:Prgm
:ClrIO
:Disp "four forms of a line"
:Disp "press enter"
:Pause
:ClrIO
:Disp "where to..."
:Disp "1.point slope form"
:Disp "2.slope-intercept form"
:Disp "3. standard form"
:Disp "4.intercepts form"
:Disp "5. all forms"
:Pause
:Prompt z
:If z=1 Then
:Goto u
:Lbl u
:ClrIO
:Disp "enter points"
:Disp "(x1,y1)(x2,y2)
:Prompt a,b,c,d
:ClrIO
:Disp "m= (y2-y1)/(x2-x1)"
:Disp "a=x1 b=y1 c=x2 d=y2"
:(d-b)/(c-a)->m
:Disp "slope=",m
:Disp "write that down"
:Pause
:ClrIO
:Disp "1.point-slope form"
:Disp "y-y1=m(x-x1)"


the end is where I am stuck. I want to take that equation and with the points prompted (a,b,c,d) and substitute those into the equation and actually get the point slope form of the line. Would I use a function? What do I do to do that and then Display the answer in point slope form. So if the points are (-2,-7)(5,3) the answer would be displayed as
y-3= (10/7)(x-5) thus substituting m=10/7 x1=5 y1=3.

I have done this before with the TI-83 and TI-84 using the text commands but have no clue how to do that on the TI-89.

This program is not for me it is for my roommate who is horrible at math.
Back to top
View user's profile Send private message
Boom



Joined: 09 Feb 2009
Posts: 2

PostPosted: February 9, 2009 4:23 PM    Post subject: :Disp "y-y1=m(x-x1)" Reply with quote

ok to fix that you have to put each varible as its own string. you can add strings together with a '&' symbul between them, you can also tell the it89 to treat a number as a string with the 'string(' comand.

so to get what you are looking for replace :Disp "y-y1=m(x-x1)" with

:Disp "Y-"&string(b)&"="&string(m)&"(X-"&string(a)&")"

'string(' can be found by pressing [2nd]->[5]->[D]->[1]
'&' can be found by pressing [2nd]->[+]->[3]->[6]

also you could restore the numbers as strings to cut down the lenght of the Disp comand like so:

:string(a)->a
:string(b)->b
:string(m)->m
:Disp "Y-"&b&"="&m&"(X-"&a&")"

hope this helps, goodluck on future programing projects.
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 -> 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 |