* Bug #12911 fixed - eig Matlab-equivalent help page updated.
[scilab.git] / scilab / modules / m2sci / help / en_US / m2sci_equivalents / e / eig.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2009 - DIGITEO - Vincent COUVERT
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-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:id="m2sci_eig">
14     <refnamediv>
15         <refname>eig (Matlab function)</refname>
16         <refpurpose>Find eigenvalues and eigenvectors</refpurpose>
17     </refnamediv>
18     <refsection>
19         <title>Matlab/Scilab equivalent</title>
20         <informaltable border="1" width="100%">
21             <tr>
22                 <td align="center">
23                     <emphasis role="bold">Matlab</emphasis>
24                 </td>
25                 <td align="center">
26                     <emphasis role="bold">Scilab</emphasis>
27                 </td>
28             </tr>
29             <tr>
30                 <td>
31                     <programlisting role="example"><![CDATA[
32 eig
33 ]]></programlisting>
34                 </td>
35                 <td>
36                     <programlisting role="example"><![CDATA[
37 spec ; bdiag 
38 ]]></programlisting>
39                 </td>
40             </tr>
41         </informaltable>
42     </refsection>
43     <refsection>
44         <title>Particular cases</title>
45         <variablelist>
46             <varlistentry>
47                 <term>eig(A)</term>
48                 <listitem>
49                     <para>Scilab equivalent for eig(A) is spec(A). Scilab eigenvector matrix can differ from Matlab one.</para>
50                 </listitem>
51             </varlistentry>
52             <varlistentry>
53                 <term>eig(A,'nobalance')</term>
54                 <listitem>
55                     <para>
56                         There is no Scilab equivalent for <emphasis role="bold">"nobalance"</emphasis> option. See examples.
57                     </para>
58                 </listitem>
59             </varlistentry>
60             <varlistentry>
61                 <term>eig(A,B,flag)</term>
62                 <listitem>
63                     <para>
64                         There is no Scilab equivalent for <emphasis role="bold">flag</emphasis>.
65                     </para>
66                 </listitem>
67             </varlistentry>
68         </variablelist>
69     </refsection>
70     <refsection>
71         <title>Additional Remarks</title>
72         <para>
73             <note>
74                 If matrix <varname>B</varname> is nonsingular, the generalized eigenvalues can be computed 
75                 as the eigenvalues of the matrix <latex>B^{-1}A</latex> i.e. <code>d=spec(B^-1*A)</code>. 
76             </note>
77         </para>
78     </refsection>
79      
80     <refsection>
81         <title>Examples</title>
82         <informaltable border="1" width="100%">
83             <tr>
84                 <td align="center">
85                     <emphasis role="bold">Matlab</emphasis>
86                 </td>
87                 <td align="center">
88                     <emphasis role="bold">Scilab</emphasis>
89                 </td>
90             </tr>
91             <tr>
92                 <td>
93                     <programlisting role="example"><![CDATA[
94 d = eig(A,'balance')
95 [V,D] = eig(A,'balance')
96 [V,D] = eig(A,'balance')
97 d = eig(A,B)
98 d = eig(A,B)
99 d = eig(A,B)
100 [V,D] = eig(A,B)
101 ]]></programlisting>
102                 </td>
103                 <td>
104                     <programlisting role="example"><![CDATA[
105 d = spec(A)
106 [D,V]=bdiag(A)
107 [V,D] = spec(A)
108 [al,be] = spec(A,B); d = al./be;
109 d = spec(A,B)
110 d = spec(inv(B)*A)
111 [al,be,V] = spec(A,B); D = diag(al./be);
112 ]]></programlisting>
113                 </td>
114             </tr>
115         </informaltable>
116     </refsection>
117 </refentry>