beautypg.com

HP Prime Graphing Calculator User Manual

Page 401

background image

Functions and commands

397

lgcd

Returns the greatest common divisor of a list of integers or

polynomials.

lgcd(Seq or Lst)

Example:

lgcd([45,75,20,15])

gives

5

lin

Returns an expression with the exponentials linearized.

lin(Expr)

Example:

lin((exp(x)^3+exp(x))^2)

gives

exp(6*x)+2*exp(4*x)+exp(2*x)

line_segments

Returns the list of the line segments (one line=one segment) of

a polyhedron.

line_segments(Polygon or Polyedr(P))

linear_interpolate

Takes a regular sample from a polygonal line defined by a

matrix of two rows.

linear_interpolate(Mtrx,xmin,xmax,xstep)

linear_regression

Returns the coefficients a and b of y=a*x+b, where y is the

line that best approximates the points whose coordinates are

the elements in two lists or the rows of a matrix.

linear_regression(Lst||Mtrx(A),[Lst])

Example:

linear_regression([[0.0,0.0],[1.0,1.0],[2.0,4
.0],[3.0,9.0],[4.0,16.0]])

gives

4.0,-2.0

LineHorz

Draws the horizontal line y=a.

LineHorz(Expr(a))

LineTan

Draws the tangent to y=f(x) at x=a.

LineTan(Expr(f(x)),[Var],Expr(a))

LineVert

Draws the vertical line x=a.

LineVert(Expr(a))