HP Prime Graphing NW280AAABA manual Replace Syntax REPLACEname, start, object

Models: Prime Graphing NW280AAABA

1 616
Download 616 pages 24.49 Kb
Page 551
Image 551

EDITMAT Syntax: EDITMAT(name)

Starts the Matrix Editor and displays the specified matrix. If used in programming, returns to the program when user

presses . Even though this command returns the matrix that was edited, EDITMAT cannot be used as an argument in other matrix commands.

REDIM Syntax: REDIM(name, size)

Redimensions the specified matrix (name) or vector to size. For a matrix, size is a list of two integers (n1,n2). For a vector, size is a list containing one integer (n). Existing values in the matrix are preserved. Fill values will be 0.

REPLACE Syntax: REPLACE(name, start, object)

Replaces portion of a matrix or vector stored in name with an object starting at position start. Start for a matrix is a list containing two numbers; for a vector, it is a single number. REPLACE also works with lists, graphics, and strings. For example, REPLACE("123456", 2, "GRM") -> "1GRM56"

SCALE Syntax: SCALE(name, value, rownumber)

Multiplies the specified row_number of the specified matrix by value.

SCALEADD Syntax: SCALEADD (name, value, row1, row2)

Multiplies the specified row1 of the matrix (name) by value, then adds this result to the second specified row2 of the matrix (name) and replaces row1 with the result.

SUB Syntax: SUB (name, start, end)

Extracts a sub-object—a portion of a list, matrix, or graphic—and stores it in name. Start and end are each specified using a list with two numbers for a matrix, a number for vector or lists, or an ordered pair, (X,Y), for graphics: SUB(M1{1,2},{2,2})

SWAPCOL Syntax: SWAPCOL (name, column1, column2)

Swaps column1 and column2 of the specified matrix (name).

SWAPROW Syntax: SWAPROW(name, row1, row2)

Swaps row1 and row2 in the specified matrix (name).

Programming in HP PPL

545

Page 551
Image 551
HP Prime Graphing NW280AAABA manual Replace Syntax REPLACEname, start, object, Scale Syntax SCALEname, value, rownumber