PDA

View Full Version : TI-BASIC Code


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

navyfalcon
05-20-2008, 01:12 AM
found out how to get the sum of squares
L1L1->L2
sum(L2->Y

strange, I tried several different methods, but this is the only one that gave correct answers

I guess I could L1^2->L2 but I haven't tried it
the program is for Statistics "Standard Deviation from a list or summarized data
Thank You
falcon