<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( https://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="penlaur">
    <refnamediv>
        <refname>penlaur</refname>
        <refpurpose>Laurent coefficients of matrix pencil</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>[Si,Pi,Di,order]=penlaur(Fs)
            [Si,Pi,Di,order]=penlaur(E,A)
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>Fs</term>
                <listitem>
                    <para>
                        a regular pencil <literal>s*E-A</literal>
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>E, A</term>
                <listitem>
                    <para>two real square matrices</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>Si,Pi,Di</term>
                <listitem>
                    <para>three real square matrices</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>order</term>
                <listitem>
                    <para>integer</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            <literal>penlaur</literal> computes the first Laurent coefficients of <literal>(s*E-A)^-1</literal> at
            infinity.
        </para>
        <para>
            <literal>(s*E-A)^-1 = ... + Si/s - Pi - s*Di + ...</literal> at <literal>s</literal> = infinity.
        </para>
        <para>
            <literal>order</literal> = order of the singularity (order=index-1).
        </para>
        <para>
            The matrix pencil <literal>Fs=s*E-A</literal> should be invertible.
        </para>
        <para>
            For a index-zero pencil, <literal>Pi, Di,...</literal> are zero and <literal>Si=inv(E)</literal>.
        </para>
        <para>
            For a index-one pencil (order=0),<literal>Di</literal> =0.
        </para>
        <para>
            For higher-index pencils, the terms <literal> -s^2 Di(2), -s^3    Di(3),... </literal> are given by:
        </para>
        <para>
            <literal> Di(2)=Di*A*Di</literal>, <literal> Di(3)=Di*A*Di*A*Di</literal> (up
            to <literal>Di(order)</literal>).
        </para>
    </refsection>
    <refsection>
        <title>Remark</title>
        <para>
            Experimental version: troubles when bad conditioning of <literal>so*E-A</literal>
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
F=randpencil([],[1,2],[1,2,3],[]);
F=rand(6,6)*F*rand(6,6);[E,A]=pen2ea(F);
[Si,Pi,Di]=penlaur(F);
[Bfs,Bis,chis]=glever(F);
norm(coeff(Bis,1)-Di,1)
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="glever">glever</link>
            </member>
            <member>
                <link linkend="pencan">pencan</link>
            </member>
            <member>
                <link linkend="rowshuff">rowshuff</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
