navyfalcon
05-20-2008, 12:47 AM
I hope this is the right forum for TI-Basic code (I'm new)
What is the code for TI-BASIC to square each item in a list
Example of list
1. Input "L1 =",Str1 need commas between numbers
2. expr("{"+Str1->L1
3. 0->A clears location "A"
4. For(I,1,dim(L1 dim gives size of L1 For(I,1 puts data into
5. A+L1(I)->A L1 separate items (separates numbers)
6. End stops loop
I want to square each item and put it into L2
then I can sum(L2 which should give me "sum of squares"
note: need to square each item (number) separately
dim(L1->n gives number of items (numbers) in L1
sum(L1->B gives sum of items(numbers in L1
I need sum X^2 for formula to calculate deviation (statistics)
Thank You
falcon
What is the code for TI-BASIC to square each item in a list
Example of list
1. Input "L1 =",Str1 need commas between numbers
2. expr("{"+Str1->L1
3. 0->A clears location "A"
4. For(I,1,dim(L1 dim gives size of L1 For(I,1 puts data into
5. A+L1(I)->A L1 separate items (separates numbers)
6. End stops loop
I want to square each item and put it into L2
then I can sum(L2 which should give me "sum of squares"
note: need to square each item (number) separately
dim(L1->n gives number of items (numbers) in L1
sum(L1->B gives sum of items(numbers in L1
I need sum X^2 for formula to calculate deviation (statistics)
Thank You
falcon