
Page 10-13
Function
→
DIAG
Function
→
DIAG takes the main diagonal of a square matrix of dimensions
n
×
n, and creates a vector of dimension n containing the elements of the main
diagonal. For example, for the matrix remaining from the previous exercise,
we can extract its main diagonal by using:
In RPN mode, with the 3
×
3 matrix in the stack, we simply have to activate
function
DIAG
to obtain the same result as above.
Function
DIAG
→
Function DIAG
→
takes a vector and a list of matrix dimensions {rows,
columns}, and creates a diagonal matrix with the main diagonal replaced
with the proper vector elements. For example, the command
DIAG
([1,-1,2,3],{3,3})
produces a diagonal matrix with the first 3 elements of the vector argument:
In RPN mode, we can use
[1,-1,2,3]
`
{3,3}
`
DIAG
to
obtain the same result as above.
Another example of application of the DIAG
→
function follows, in ALG mode:
In RPN mode, use
[1,2,3,4,5]
`
{3,2}
`
DIAG
.
In this case a 3
×
2 matrix was to be created using as main diagonal elements
as many elements as possible form the vector [1,2,3,4,5]. The main diagonal,
for a rectangular matrix, starts at position (1,1) and moves on to position (2,2),
(3,3), etc. until either the number of rows or columns is exhausted. In this
case, the number of columns (2) was exhausted before the number of rows (3),
Содержание 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 ...