To assemble a matrix from a sequence of elements – HP 49g Graphing Calculator User Manual
Page 50
Attention! The text in this document has been recognized automatically. To view the original document, you can use the "Original mode".
![background image](/manuals/632032/50/background.png)
To assemble a matrix with a particular diagonal From a vector
1. Select the Vector-to-Matrix Diagonal conmiand.
0 {MS§)
create
diag
^
2. Enter the vector containing the diagonal elements.
3. Enter either:
• a list containing the dimensions of the desired matrix: {nrws
columns] or
• a real number representing the number of rows and columns in the
desired square matrix.
4. Press
(HI).
The result is a matrix of the desired dimensions using the elements of
the vector as the diagonal elements of the matrix. If the vector
contains more diagonal elements than are needed to create the matrix,
the extra elements are discarded. If the vector does not contain
enough elements to complete the matrix, the imdefined diagonal
elements are set to zero.
To assemble a matrix From a sequence oF elements
1. Select the Stack-to-Array conunand.
0
(PRG) TYPE ^ARRY
2. Enter the elements in rote-major order.
Row-major order begins with the first element (the element in row 1
and column 1). The next element is the next one in the row. If there are
no more elements in the row, the next element is the first element in
the next row, and so on.
3. Enter a list containing the dimensions of the desired matrix: {rows,
columns].
4. Press (H5) to assemble the matrix.
^1
2
For example, ^ARRY(1, 2, 3, 4, ¡2, 2j) results in
3 4
Matrices and linear algebra
Page 5-9