* Bug #13531 fixed - Fixed sylv help page to include the real Sylester equation.
[scilab.git] / scilab / modules / linear_algebra / help / en_US / pencil / sylv.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2008 - INRIA
5  *
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.1-en.txt
11  *
12  -->
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" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="sylv">
14     <refnamediv>
15         <refname>sylv</refname>
16         <refpurpose>Sylvester equation.</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>Calling Sequence</title>
20         <synopsis>sylv(A, B, C, flag)</synopsis>
21     </refsynopsisdiv>
22     <refsection>
23         <title>Arguments</title>
24         <variablelist>
25             <varlistentry>
26                 <term>A,B,C</term>
27                 <listitem>
28                     <para>three real matrices of appropriate dimensions.</para>
29                 </listitem>
30             </varlistentry>
31             <varlistentry>
32                 <term>flag</term>
33                 <listitem>
34                     <para>
35                         character string (<literal>'c'</literal> or <literal>'d'</literal>)
36                     </para>
37                 </listitem>
38             </varlistentry>
39         </variablelist>
40     </refsection>
41     <refsection>
42         <title>Description</title>
43         <para>
44             <literal>X= sylv(A, B, C, 'c')</literal> computes <literal>X</literal>, solution
45             of the "continuous time" Sylvester equation
46         </para>
47         <programlisting role=""><![CDATA[
48 A*X+X*B = C
49  ]]></programlisting>
50         <para>
51             <literal>X=sylv(A, B, C, 'd')</literal> computes <literal>X</literal>, solution
52             of the modified "discrete time" Sylvester equation
53         </para>
54         <programlisting role=""><![CDATA[
55 A*X*B+X = C
56  ]]></programlisting>
57         <para>
58             <literal>X=-sylv(-A, B, C, 'd')</literal> computes <literal>X</literal>, solution
59             of the real "discrete time" Sylvester equation
60         </para>
61         <programlisting role=""><![CDATA[
62 A*X*B-X = C
63  ]]></programlisting>
64     </refsection>
65     <refsection>
66         <title>Examples</title>
67         <programlisting role="example"><![CDATA[
68 // Continuous time Sylvester equation:
69 A = rand(4, 4); C = rand(4, 3); B = rand(3, 3);
70 X = sylv(A, B, C, 'c');
71 norm(A*X+X*B-C)
72
73 // Modified Discrete time Sylvester equation:
74 X = sylv(A, B, C, 'd');
75 norm(A*X*B+X-C)
76
77 // Real Discrete time Sylvester equation:
78 X = -sylv(-A, B, C, 'd');
79 norm(A*X*B-X-C)
80  ]]></programlisting>
81     </refsection>
82     <refsection role="see also">
83         <title>See Also</title>
84         <simplelist type="inline">
85             <member>
86                 <link linkend="lyap">lyap</link>
87             </member>
88         </simplelist>
89     </refsection>
90 </refentry>