linalg(deprecated)/diag - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : linalg(deprecated)/diag

linalg(deprecated)

  

diag

  

create a block diagonal matrix

  

BlockDiagonal

  

a synonym for diag

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

diag(B1, B2, .., Bn)

BlockDiagonal(B1, B2, ..., Bn)

Parameters

B[1], B[2], ..., B[n]

-

square matrices or scalar matrix entries

Description

• 

Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[DiagonalMatrix], instead.

  

- For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.

• 

The call diag(B1, B2, .., Bn) returns a matrix on whose diagonal are the matrix blocks B1, B2, .., Bn.

• 

If used in conjunction with JordanBlock, diag can be used to easily create a Jordan form matrix.

• 

The command with(linalg,diag) allows the use of the abbreviated form of this command.

Examples

Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[DiagonalMatrix], instead.

withlinalg:

B1array1,3,5,9,a,z,x2,sinq,10

B11359azx2sinq10

(1)

B2matrix2,2,1,3,2,4

B21324

(2)

diagB1,B2

135009az00x2sinq10000001300024

(3)

diagλ1,λ2

λ100λ2

(4)

See Also

linalg(deprecated)[companion]

linalg(deprecated)[JordanBlock]

LinearAlgebra