DIAG

Type: Command

Description: Vector to Matrix Diagonal Command: Takes an array and a specified dimension and returns a matrix whose major diagonal elements are the elements of the array.

Real number dimensions are rounded to integers. If a single dimension is given, a square matrix is returned. If two dimensions are given, the proper order is { number of rows, number of columns }. No more than two dimensions can be specified.

If the main diagonal of the resulting matrix has more elements than the array, additional diagonal elements are set to zero. If the main diagonal of the resulting matrix has fewer elements than the array, extra array elements are dropped.

Access:

CREATELDIAG

 

( Ø is the leftshift of the

5key).

 

MATRIX LDIAG

 

( ´is the leftshift of the

Pkey).

 

MATRIX MAKELLDIAG

( ´is the leftshift of the

Pkey).

Input/Output:

 

 

 

 

 

 

 

 

 

 

 

 

 

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

 

 

 

 

 

 

 

 

[ array ]diagonals

{ dim }

[[ matrix ]]

See also:

→DIAG

 

 

 

 

 

 

 

 

 

 

DIAG

Command

 

 

 

 

Type:

 

 

 

 

Description:

Matrix Diagonal to Array Command: Returns a vector that contains the major diagonal elements

 

of a matrix.

 

 

 

 

 

The input matrix does not have to be square.

 

 

 

Access:

CREATE DIAG

 

( Ø is the leftshift of the

5 key).

 

MATRIX LDIAG

 

( ´is the leftshift of the

P key).

 

MATRIX MAKE LLDIAG

( ´is the leftshift of the

P key).

Input/Output:

 

 

 

 

 

 

 

 

Level 1/Argument 1

 

Level 1/Item 1

 

 

 

 

 

 

 

[[ matrix ]]

[ vector ]diagonals

See also:

DIAG→

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DIAGMAP

 

 

 

 

 

 

Type:

Command

 

 

 

 

Description:

Applies a holomorphic operator to a diagonalizable matrix.

 

 

Access:

Matrices, !Ø L EIGENVECTORS.

 

 

 

Input:

Level 2/Argument 1: A diagonalizable matrix.

 

 

 

 

Level 1/Argument 2: An operator, expressed as a function. The function can be stored in a

 

variable with DEF, or can be a program, or a single expression.

 

 

Output:

The matrix that results from applying the operator to the matrix.

 

 

Flags:

Exact mode must be set (flag –105 clear).

 

 

 

 

Numeric mode must not be set (flag –3 clear).

 

 

 

Example: Apply the operator ex to the matrix

1 1

0 2

358 Full Command and Function Reference

Page 178
Image 178
HP 50g Graphing, 48gII Graphing manual Diag→, →Diag, Diagmap