Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2023.0.0 - English


bdiag

block diagonalization, generalized eigenvectors

Syntax

[Ab, X, bs] = bdiag(A)
[Ab, X, bs] = bdiag(A, rmax)

Arguments

A

real or complex square matrix

rmax

real number

Ab

real or complex square matrix

X

real or complex non-singular matrix

bs

vector of integers

Description

[Ab, X, bs] = bdiag(A, rmax) performs the block-diagonalization of matrix A. bs gives the structure of the blocks (respective sizes of the blocks). X is the change of basis i.e. Ab = inv(X)*A*X is block diagonal.

rmax controls the conditioning of X. The default value is the l1 norm of A.

To get a diagonal form (if it exists), choose a large value for rmax (rmax=1/%eps for example). Generically (for real random A) the blocks are (1x1) and (2x2) and X is the matrix of eigenvectors.

Examples

// Real case: 1x1 and 2x2 blocks
a = rand(5,5);
[ab, x, bs] = bdiag(a);ab
--> [ab, x, bs] = bdiag(a);ab
 ab  =
   2.4777836   0.          0.          0.         0.
   0.          0.0757087   0.4869251   0.         0.
   0.         -0.5777956  -0.1248605   0.         0.
   0.          0.          0.          0.069654   0.
   0.          0.          0.          0.         0.5341598
// Complex case: complex 1x1 blocks
[ab, x, bs] = bdiag(a+%i*0); ab

See also

  • schur — [ordered] Schur decomposition of matrix and pencils
  • sylv — Sylvester equation.
  • spec — eigenvalues, and eigenvectors of a matrix or a pencil
  • blockdiag — Creates a block diagonal matrix from provided arrays. Block diagonal system connection.
  • lcmdiag — least common multiple diagonal factorization
Report an issue
<< balanc Eigenvalue and Singular Value eigs >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Mar 27 11:52:43 GMT 2023