[TIB] Re: help,store to variable with loop


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

[TIB] Re: help,store to variable with loop



For i,1,3
(((x-a)^i)*(x-b))/->/#"f"&string(i)
endfor

/->/ is store, right above the on?
#turns a string to a variable, so its taking str"F"&string(i), makes it a string, ex. F22, turning it into a variable, and storing data to it.

Original message attached.


Aaron Fineman
-----
For i,1,3
Expr("(x-a)^i)*(x-b)->f"&string(i))
EndFor
 
I haven't tested that, but, based on where I've used Expr() before, it should work.
----- Original Message -----
From: giwrgos giwrgos
To: ti-basic@lists.ticalc.org
Sent: Friday, April 04, 2003 5:40 AM
Subject: [TIB] help,store to variable with loop

I am using a ti-89,basic programming
I need to store to variable with a loop
for example

For i,1,3
define ((x-a)^i)*(x-b)="f"&string(i)
endfor

it's not right but that's the idea
so in the end i have the variables
f1=(x-a)*(x-b),f2=(x-a)^2*(x-b),f3=(x-a)^3*(x-b)
How can I do that?
Is it possible to store functions as well? how?
Thank you



MSN 8 helps ELIMINATE E-MAIL VIRUSES. Get 2 months FREE*.