The map function, The map function ,8-12 – HP 50g Graphing Calculator User Manual

Page 269

Advertising
background image

Page 8-12

SEQ is useful to produce a list of values given a particular expression and is
described in more detail here.

The SEQ function takes as arguments an expression in terms of an index, the
name of the index, and starting, ending, and increment values for the index,
and returns a list consisting of the evaluation of the expression for all possible
values of the index. The general form of the function is SEQ(expression, index,
start, end, increment
).

In the following example, in ALG mode, we identify expression = n

2

, index =

n, start = 1, end = 4, and increment = 1:

The list produced corresponds to the values {1

2

, 2

2

, 3

2

, 4

2

}. In RPN mode, you

can list the different arguments of the function as follows:

before applying function SEQ.

The MAP function

The MAP function, available through the command catalog (‚N), takes as
arguments a list of numbers and a function f(X) or a program of the form <<
a … >>, and produces a list consisting of the application of that function or
program to the list of numbers. For example, the following call to function MAP
applies the function SIN(X) to the list {1,2,3}:

In ALG mode, the syntax is:

~~map~!Ь!д1@н2@н3™@

н S~X`

In RPN mode, the syntax is:

!д1@н2@н3`³S~X`~~m

ap`

Advertising