Re: TIB: TI-89 Basic question


[Prev][Next][Index][Thread]

Re: TIB: TI-89 Basic question




()
Prgm
Prompt x,y,xx,yy
(yy-y)/(xx-x)»m
Disp "Slope is"
Disp m
solve(y=mx+b,b)»c
Delvar x
Delvar y
Disp y=mx+c
EndPrgm

ok.  I don't have much time right now, but one thing that's wrong here is 
your use of y=mx+b.  The system treats "mx" as a single variable, not m*x.  
In order for the prog to work properly, you should use y=m*x+b.  That's all 
I see right now...

>From: TerrisUS@aol.com
>Reply-To: ti-basic@lists.ticalc.org
>To: ti-basic@lists.ticalc.org
>Subject: TIB: TI-89 Basic question
>Date: Thu, 23 Mar 2000 17:22:50 EST
>
>
>ok, im writing a small program (pasted at the end of this email), which all
>it does is, given 2 sets of points, calculates the slope, solves for b, and
>puts the equation into y=mx+b form (with y and x remaining as variables, 
>and
>m being replaced with the slope as a fraction, and b being replaced by the
>value it was solved for).
>and the part of it that finds the slope works fine. however, converting it
>into y=mx+b is another story. if I input into the program 2 (for x), 3 (for
>y), 7 (for xx, or x2 if you will) and 7 (for yy, or y2), it gives me a 
>slope
>of "4/5" (which is correct), but for the 2nd part, transforming it into
>y=mx+b form (and ive tried it just solving for b, and displaying that, so
>that isnt the problem), it says "y=(b+mx=3)"". what it should say in that
>case is "y=4/5x+7/5" (i believe i did that math out right. in any event, 
>you
>get the idea). anyone know why it isn't displaying the y=mx+b part anywhere
>near right?
>
>(ok, program is below) (the » is the store key by the way) (oh, and the 
>final
>display equation says "y=mx+c", but it's just c because that's what i 
>stored
>the answer for "b" as. as i said above, it should say y=[num]x+[num], whith
>[num] being a number and the other variables just displaying themself)
>
>()
>Prgm
>Prompt x,y,xx,yy
>(yy-y)/(xx-x)»m
>Disp "Slope is"
>Disp m
>solve(y=mx+b,b)»c
>Delvar x
>Delvar y
>Disp y=mx+c
>EndPrgm
>
>
>
>
>

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com