We're glad you came by, but you might find what you're looking for elsewhere.
TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it.
Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope.
Date: 19 Mar 2008 04:49
Number of posts: 7
rss icon RSS: New posts
I have a basic program with a list of 11 items (numbers). I want to select one at a time to square and put in another list.
part of program:
Input "L1=?", Str1
expr("{"+Str1->L1
For(I,1,dim(L1
End
Need to select each item and square it then put in a new list
I need another For statement to increment the list
but how do I select the number so I can square it and put it in another list
Thank You
falcon
Why not just use L1^2->L2? That would square each number in the list and store the results in L2. To answer your question about selecting a single element to a list just type L1(1) for the first number in L1, L1(2) for the second number in L1, and so on.
Let's say your list is called tidev. And has the dimensions of 30. To locate the first number in the set, do this.
:LTIDEV(1)To perform an operation on that value, store it to a variable, perform the operation, and then store the variable to the list. If you don't understand, I wrote it below.
:LTIDEV(1)->A
:A*2->LTIDEV(1)You do realize that this question was asked three and a half years ago right? It's generally considered bad forum manners to revive such old threads that really don't need to be revived.
Oops.