<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 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="copfac">
    <refnamediv>
        <refname>copfac</refname>
        <refpurpose>right coprime factorization of continuous time dynamical systems</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>
            [N, M, XT, YT] = copfac(G)
            [N, M, XT, YT] = copfac(G, polf, polc, tol)
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>G</term>
                <listitem>
                    <para>a continuous-time  linear dynamical system.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>polf, polc</term>
                <listitem>
                    <para>
                        respectively the poles of <literal>XT</literal> and <literal>YT</literal> and the poles of <literal>n</literal>  and <literal>M</literal> (default values =-1).
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>tol</term>
                <listitem>
                    <para>
                        real threshold for detecting stable poles (default value <literal>100*%eps</literal>)
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>N,M,XT,YT</term>
                <listitem>
                    <para>continuous-time linear dynamical systems.</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            <literal>[N,M,XT,YT]=copfac(G,[polf,polc,[tol]])</literal> returns a right coprime factorization of <literal>G</literal>.
        </para>
        <para>
            <literal>G= N*M^-1</literal> where <literal>N</literal> and <literal>M</literal> are stable, proper and right coprime.
            (i.e. <literal>[N M]</literal> left-invertible with stability)
        </para>
        <para>
            <literal>XT</literal> and <literal>YT</literal> satisfy:
        </para>
        <para>
            <literal>[XT -YT].[M N]' = eye</literal> (Bezout identity)
        </para>
        <para>
            <literal>G</literal> is assumed stabilizable and detectable.
        </para>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="syslin">syslin</link>
            </member>
            <member>
                <link linkend="lcf">lcf</link>
            </member>
        </simplelist>
    </refsection>
    <refsection>
        <title>History</title>
        <revhistory>
            <revision>
                <revnumber>5.4.0</revnumber>
                <revremark>
                    <literal>Sl</literal> is now checked for continuous time linear dynamical system.
                    This modification has been introduced by this  <ulink url="http://gitweb.scilab.org/?p=scilab.git;a=commit;h=3d7083daae3339813ba747c8adcda1f9599bb80d">commit</ulink>
                </revremark>
            </revision>
        </revhistory>
    </refsection>
</refentry>
