
Page 18-59
If
p
=
n-1
,
X
=
V
n
.
If
p < n-1
, then remove columns
p+2, …, n-1, n
from
V
n
to form
X
.
If
p > n-1
, then add columns
n+1, …, p-1, p+1
, to
V
n
to form matrix
X
.
In step 3 from this list, we have to be aware that column
i
(
i
=
n+1, n+2, …,
p+1
) is the vector [x
1
i
x
2
i
… x
n
i
]. If we were to use a list of data values for x
rather than a vector, i.e.,
x
= { x
1
x
2
… x
n
}, we can easily calculate the
sequence { x
1
i
x
2
i
… x
n
i
}. Then, we can transform this list into a vector and
use the COL menu to add those columns to the matrix
V
n
until
X
is completed.
After
X
is ready, and having the vector
y
available, the calculation of the
coefficient vector
b
is the same as in multiple linear fitting (the previous matrix
application). Thus, we can write a program to calculate the polynomial fitting
that can take advantage of the program already developed for multiple linear
fitting. We need to add to this program the steps 1 through 3 listed above.
The
algorithm
for the program, therefore, can be written as follows:
Enter vectors
x
and
y,
of the same dimension, as lists. (Note: since the
function VANDERMONDE uses a list as input, it is more convenient to enter
the (x,y) data as a list.) Also, enter the value of p.
•
Determine n = size of vector
x
.
•
Use the function VANDERMONDE to generate the Vandermonde
matrix
V
n
for the list
x
entered.
•
If
p = n-1
, then
X
=
V
n
,
Else If
p < n-1
Remove columns
p+2, …, n
from
V
n
to form
X
(Use a FOR loop and COL-)
Else
Add columns
n+1, …, p+1
to
V
n
to form
X
(FOR loop, calculate x
i
, convert to vector, use COL+)
•
Convert
y
to vector
•
Calculate
b
using program MTREG (see example on multiple linear
fitting above)
Содержание 48GII
Страница 1: ...hp 48gII graphing calculator user s guide H Edition 4 HP part number F2226 90020 ...
Страница 162: ...Page 3 37 Define this function by any of the means presented above and check that g 3 3 g 1 0 g 1 0 g 3 9 ...
Страница 201: ...Page 5 30 LIN LNCOLLECT POWEREXPAND SIMPLIFY ...
Страница 381: ...Page 11 55 Function KER Function MKISOM ...
Страница 461: ...Page 13 26 In the right hand side figure above we are using the line editor to see the series expansion in detail ...
Страница 777: ...Page 26 8 ...
Страница 840: ...Page L 5 ...