1
<?xml version="1.0" encoding="UTF-8"?>
3
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4
* Copyright (C) 2008 - INRIA
6
* This file must be used under the terms of the CeCILL.
7
* This source file is licensed as described in the file COPYING, which
8
* you should have received as part of this distribution. The terms
9
* are also available at
10
* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="bdiag">
15
<refname>bdiag</refname>
16
<refpurpose> block diagonalization, generalized eigenvectors</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>[Ab [,X [,bs]]]=bdiag(A [,rmax])</synopsis>
23
<title>Arguments</title>
28
<para>real or complex square matrix</para>
34
<para>real number</para>
40
<para>real or complex square matrix</para>
46
<para>real or complex non-singular matrix</para>
52
<para>vector of integers</para>
58
<title>Description</title>
59
<programlisting role=""><![CDATA[
60
[Ab [,X [,bs]]]=bdiag(A [,rmax])
63
performs the block-diagonalization of matrix <literal>A</literal>. bs
64
gives the structure of the blocks (respective sizes of the
65
blocks). <literal>X</literal> is the change of basis i.e
66
<literal>Ab = inv(X)*A*X</literal>is block diagonal.
69
<literal>rmax</literal> controls the conditioning of <literal>X</literal>; the
70
default value is the l1 norm of <literal>A</literal>.
73
To get a diagonal form (if it exists) choose a large value for
74
<literal>rmax</literal> (<literal>rmax=1/%eps</literal> for example).
75
Generically (for real random A) the blocks are (1x1) and (2x2) and
76
<literal>X</literal> is the matrix of eigenvectors.
80
<title>Examples</title>
81
<programlisting role="example"><![CDATA[
82
//Real case: 1x1 and 2x2 blocks
83
a=rand(5,5);[ab,x,bs]=bdiag(a);ab
85
//Complex case: complex 1x1 blocks
86
[ab,x,bs]=bdiag(a+%i*0);ab
89
<refsection role="see also">
90
<title>See Also</title>
91
<simplelist type="inline">
93
<link linkend="schur">schur</link>
96
<link linkend="sylv">sylv</link>
99
<link linkend="spec">spec</link>