<?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:ns5="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
          xmlns:scilab="http://www.scilab.org" xml:id="sylv" xml:lang="pt">
    <refnamediv>
        <refname>sylv</refname>
        <refpurpose>
            Resolver as equações de Sylvester A*X + X*B = C ou A*X*B + X = C
        </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Seqüência de Chamamento</title>
        <synopsis>
            sylv(A, B, C, 'c')
            sylv(A, B, C, 'd')
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Parâmetros</title>
        <variablelist>
            <varlistentry>
                <term>A, B, C</term>
                <listitem>
                    <para>três matrizes de reais de dimensões apropriadas</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>flag 'c' ou 'd'</term>
                <listitem>
                    <para>
                        Escolha o tipo de equação de Sylvester a resolver.
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Descrição</title>
        <para>
            <emphasis role="bold">X = sylv(A, B, C, 'c')</emphasis> computa <literal>X</literal>,
            solução da equação de "tempo contínuo" de Sylvester
            <literal>A*X + X*B = C</literal>.
        </para>
        <para>
            <emphasis role="bold">X = sylv(A, B, C, 'd')</emphasis> computa <literal>X</literal>,
            solução da equação de "tempo discreto" de Sylvester
            <literal>A*X*B + X = C</literal>.
        </para>
        <para>
            <emphasis role="bold">X = -sylv(-A, B, C, 'd')</emphasis> computes <literal>X</literal>
            as solution of the real "discrete time" Sylvester equation
            <literal>A*X*B - X = C</literal>.
        </para>
    </refsection>
    <refsection>
        <title>Exemplos</title>
        <programlisting role="example"><![CDATA[
A = rand(4, 4); C = rand(4, 3); B = rand(3, 3);

// Continuous time Sylvester equation:
X = sylv(A, B, C, 'c');
norm(A*X + X*B - C)

// Modified Discrete time Sylvester equation:
X = sylv(A, B, C, 'd');
norm(A*X*B + X - C)

// Real Discrete time Sylvester equation:
X = -sylv(-A, B, C, 'd');
norm(A*X*B - X - C)
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>Ver Também</title>
        <simplelist type="inline">
            <member>
                <link linkend="lyap">lyap</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
