Re: TIB: Re: TI-89 Basic question
[Prev][Next][Index][Thread]
Re: TIB: Re: TI-89 Basic question
I know what it is.
type out this:
solve(3=5*2+c,c)
and the result is "c=-7".
solve adds in the "c=" part to it, and then when you store that in b.
so whenever you use b in the rest of hte program, it is a string that
is in the form "c=#".
so what you can do is rewrite the program so that it doesn't need the
solve for c at all.
if you solve y=mx+b for b, you get y-mx=b. then you can substitute
that back in the program, and condense a few things and you will get
this:
()
Prgm
Local x,y,xx,yy,m
Prompt x,y,xx,yy
(yy-y)/(xx-x)»m
Disp "Slope is "&string(m),"y="&string(m)&"x+"&string(y-m*x)
EndPrgm
that should work like you want. and it should be slightly faster and
smaller.
----- Original Message -----
From: <TerrisUS@aol.com>
To: <ti-basic@lists.ticalc.org>
Sent: Thursday, March 23, 2000 7:26 PM
Subject: Re: TIB: Re: TI-89 Basic question
In a message dated 03/23/2000 8:16:36 PM Eastern Standard Time,
noahd@juno.com writes:
<< The TI-89 allows variable names up to eight characters long, so it
thinks
you are using a variable called "mx".
Make sure you put that multiplication sign between the two letters!
m*x >>
ok, forgot about that.
well, unless a multiplication sign needs to be added in the middle of
the
string line somewhere, it's still not displaying what it should. it
now
displays (for x,y,xx,yy values of 2,3,7,7) "y=4/5x+c=7/5"
the program wasnt changed much besides the * in the middle of the m
and x,
but i'll stick the changed program on the bottom again anyways.
blah, ti-89s dont like me
()
Prgm
Local x,y,xx,yy,m,b
Prompt x,y,xx,yy
(yy-y)/(xx-x)»m
Disp "Slope is"
Disp m
solve(y=m*x+c,c)»b
Disp "y="&string(m)&"x+"&string(b)
EndPrgm
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
References: