
Page 18-60
Here is the
translation of the algorithm
to a program in User RPL language.
(See Chapter 21 for additional information on programming):
«
Open
program
x y p
Enter lists x and y, and p (levels 3,2,1)
«
Open
subprogram
1
x SIZE
n
Determine size of x list
«
Open
subprogram
2
x VANDERMONDE Place x in stack, obtain
V
n
IF ‘p<n-1’ THEN
This IF implements step 3 in algorithm
n
Place n in stack
p 2 +
Calculate p+1
FOR j
Start loop j = n-1, n-2, …, p+1, step = -1
j COL
−
DROP
Remove column and drop it from stack
-1 STEP
Close FOR-STEP loop
ELSE
IF ‘p>n-1’ THEN
n 1 +
Calculate n+1
p 1 +
Calculate p+1
FOR j
Start a loop with j = n, n+1, …, p+1.
x j ^
Calculate
x
j
, as a list
OBJ
ARRY
Convert list to array
j COL+
Add column to matrix
NEXT
Close FOR-NEXT loop
END
Ends second IF clause.
END
Ends first IF clause. Its result is
X
y OBJ
ARRY Convert
list
y
to an array
MTREG
X
and
y
used by program MTREG
NUM
Convert to decimal format
»
Close sub-program 2
»
Close
sub-program
1
»
Close
main
program
Save it into a variable called POLY (POLYnomial fitting).
Содержание 49g+
Страница 1: ...hp 49g graphing calculator user s guide H Edition 4 HP part number F2228 90006 ...
Страница 197: ...Page 5 30 LIN LNCOLLECT POWEREXPAND SIMPLIFY ...
Страница 377: ...Page 11 55 Function KER Function MKISOM ...
Страница 457: ...Page 13 26 In the right hand side figure above we are using the line editor to see the series expansion in detail ...
Страница 775: ...Page 26 10 the location of the backup battery in the top compartment at the back of the calculator ...
Страница 838: ...Page L 5 ...