beautypg.com

HP Prime Graphing Calculator User Manual

Page 421

background image

Functions and commands

417

select

Returns a list with only the elements that satisfy the Boolean

function remaining.

select(FncBool(f),Lst(l))

Example:

select(x->x>=5,[1,2,6,7])

gives

[6,7]

seq

With an expression and two integers (a and b) as arguments,

returns the sequence obtained when the expression is

evaluated within the interval given by a and b. With an

expression and three integers (a, b and p) as arguments,

returns the sequence obtained when the expression is

evaluated with step of p within the interval given by a and b.

With an expression and three integers (n, a and b) as

arguments, returns the sequence obtained when the

expression is evaluated n times of equal spacing within the

interval given by a and b.

seq(Expr,Intg(n)||Var(var),[Intg(a)],[Intg(b)
],[Intg(p)])

Example:

seq(2^k,k=0..8)

gives

1,2,4,8,16,32,64,128,256

seqsolve

Returns the value of a recurrent sequence or a system of

recurrent sequences (u_{n+1}=f(u_n) or

u_{n+2}=f(u_{n+1},u_n)...).

seqsolve((Expr or LstExpr),(Var or
LstVar),(InitVal or LstInitVal))

Example:

seqsolve(2x+n,[x,n],1)

gives

-n-1+2*2^n

shift_phase

Returns the result of applying a phase shift of pi/2 to a

trigonometric expression.

shift_phase(Expr)

Example:

shift_phase(sin(x))

gives

-cos((pi+2*x)/2)

signature

Returns the signature of a permutation.

signature(Permut)

Example:

signature([1,0,3,4,2])

gives

[100.0,100.0,0.0,87,14,""]