<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2008 - INRIA
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->
<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" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="quaskro">
    <refnamediv>
        <refname>quaskro</refname>
        <refpurpose>quasi-Kronecker form</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>
            [Q, Z, Qd, Zd, numbeps, numbeta] = quaskro(F)
            [Q, Z, Qd, Zd, numbeps, numbeta] = quaskro(E,A)
            [Q, Z, Qd, Zd, numbeps, numbeta] = quaskro(F,tol)
            [Q, Z, Qd, Zd, numbeps, numbeta] = quaskro(E,A,tol)
        </synopsis>
    </refsynopsisdiv>
    <refsection role="parameters">
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>F</term>
                <listitem>
                    <para>
                        real matrix pencil <literal>F=s*E-A</literal>  (<literal>s=poly(0,'s')</literal>)
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>E,A</term>
                <listitem>
                    <para>two real matrices of same dimensions</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>tol</term>
                <listitem>
                    <para>a real number (tolerance, default value=1.d-10)</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>Q,Z</term>
                <listitem>
                    <para>two square orthogonal matrices</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>Qd,Zd</term>
                <listitem>
                    <para>two vectors of integers</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>numbeps</term>
                <listitem>
                    <para>vector of integers</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection role="description">
        <title>Description</title>
        <para>
            Quasi-Kronecker form of matrix pencil: <literal>quaskro</literal> computes two
            orthogonal matrices <literal>Q, Z</literal> which put the pencil <literal>F=s*E -A</literal> into
            upper-triangular form:
        </para>
        <screen><![CDATA[
           | sE(eps)-A(eps) |        X       |      X     |
           |----------------|----------------|------------|
           |        O       | sE(inf)-A(inf) |      X     |
Q(sE-A)Z = |=================================|============|
           |                                 |            |
           |                O                | sE(r)-A(r) |
 ]]></screen>
        <para>
            The dimensions of the blocks are given by:
        </para>
        <para>
            <literal>eps=Qd(1) x Zd(1)</literal>, <literal>inf=Qd(2) x Zd(2)</literal>,
            <literal>r = Qd(3) x Zd(3)</literal>
        </para>
        <para>
            The <literal>inf</literal> block contains the infinite modes of
            the pencil.
        </para>
        <para>
            The <literal>f</literal> block contains the finite modes of
            the pencil
        </para>
        <para>
            The structure of epsilon blocks are given by:
        </para>
        <para>
            <literal>numbeps(1)</literal> = <literal>#</literal> of eps blocks of size 0 x 1
        </para>
        <para>
            <literal>numbeps(2)</literal> = <literal>#</literal> of eps blocks of size 1 x 2
        </para>
        <para>
            <literal>numbeps(3)</literal> = <literal>#</literal> of eps blocks of size 2 x 3  etc...
        </para>
        <para>
            The complete (four blocks) Kronecker form is given by
            the function <literal>kroneck</literal> which calls <literal>quaskro</literal> on
            the (pertransposed) pencil <literal>sE(r)-A(r)</literal>.
        </para>
        <para>
            The code is taken from T. Beelen
        </para>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="kroneck">kroneck</link>
            </member>
            <member>
                <link linkend="schur">schur</link>
            </member>
            <member>
                <link linkend="spec">spec</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
