ti basic - How do I iterate through a list in a TI-83 calculator program -


i created set of programs calculate area under graph using various methods of approximation (midpoint, trapezoidal, simpson) calculus class.

here example of 1 of programs (midpoint):

prompt a,b,n (a-b)/n->d input "y1=", y1 0->x 0->e for(x,a+d/2,b-d/2,d) y1(x)+e->e end disp e*d 

instead of applying these approximation rules function (y1), apply them list of data (l1). how iterate through list? need able last index in list in order "for loop" good. can't l1.length in java.

you can obtain length of list using dim(). can found in 2nd->list->ops->dim(. make sure use list variable otherwise dim() complain type. index list subscript.

e.g.,

{1, 2, 3, 4} -> l1 (x, 1, dim(l1), 1) disp l1(x) end 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -