~ubuntu-branches/ubuntu/raring/scilab/raring-proposed

« back to all changes in this revision

Viewing changes to modules/linear_algebra/help/pt_BR/aff2ab.xml

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-08-30 14:42:38 UTC
  • mfrom: (1.4.7)
  • Revision ID: package-import@ubuntu.com-20120830144238-c1y2og7dbm7m9nig
Tags: 5.4.0-beta-3-1~exp1
* New upstream release
* Update the scirenderer dep
* Get ride of libjhdf5-java dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
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) 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-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:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="aff2ab" xml:lang="en">
14
 
  <refnamediv>
15
 
    <refname>aff2ab</refname>
16
 
    <refpurpose>Convers�o de uma fun��o linear (afim) para forma
17
 
      A,b
18
 
    </refpurpose>
19
 
  </refnamediv>
20
 
  <refsynopsisdiv>
21
 
    <title>Seq��ncia de Chamamento</title>
22
 
    <synopsis>[A,b]=aff2ab(afunction,dimX,D [,flag])</synopsis>
23
 
  </refsynopsisdiv>
24
 
  <refsection>
25
 
    <title>Par�metros</title>
26
 
    <variablelist>
27
 
      <varlistentry>
28
 
        <term>afunction</term>
29
 
        <listitem>
30
 
          <para>
31
 
            uma fun��o do Scilab <literal> Y =fct(X,D) </literal> onde
32
 
            <literal>X, D, Y</literal> s�o <literal>lists</literal> de
33
 
            matrizes
34
 
          </para>
35
 
        </listitem>
36
 
      </varlistentry>
37
 
      <varlistentry>
38
 
        <term>dimX</term>
39
 
        <listitem>
40
 
          <para>
41
 
            uma matriz de inteiros p x 2 (<literal>p</literal> � o n�mero
42
 
            de matrizes em X)
43
 
          </para>
44
 
        </listitem>
45
 
      </varlistentry>
46
 
      <varlistentry>
47
 
        <term>D</term>
48
 
        <listitem>
49
 
          <para>
50
 
            uma <literal>list</literal> de matrizes de reais (ou qualquer
51
 
            outro objeto Scilab v�lido).
52
 
          </para>
53
 
        </listitem>
54
 
      </varlistentry>
55
 
      <varlistentry>
56
 
        <term>flag</term>
57
 
        <listitem>
58
 
          <para>
59
 
            par�metro opcional (<literal>flag='f'</literal> ou
60
 
            <literal>flag='sp'</literal>)
61
 
          </para>
62
 
        </listitem>
63
 
      </varlistentry>
64
 
      <varlistentry>
65
 
        <term>A</term>
66
 
        <listitem>
67
 
          <para>uma matriz de reais</para>
68
 
        </listitem>
69
 
      </varlistentry>
70
 
      <varlistentry>
71
 
        <term>b</term>
72
 
        <listitem>
73
 
          <para>um vetor de reais tendo a mesma dimens�o de linha que
74
 
            <literal>A</literal>
75
 
          </para>
76
 
        </listitem>
77
 
      </varlistentry>
78
 
    </variablelist>
79
 
  </refsection>
80
 
  <refsection>
81
 
    <title>Descri��o</title>
82
 
    <para>
83
 
      <literal>aff2ab</literal> retorna a representa��o matricial de uma
84
 
      fun��o afim (na base can�nica).
85
 
    </para>
86
 
    <para>
87
 
      <literal>afunction</literal> � uma fun��o com sintaxe imposta:
88
 
      <literal> Y=afunction(X,D) </literal> onde <literal> X=list(X1,X2,...,Xp)
89
 
      </literal>
90
 
      � uma lista de p matrizes de reais, e <literal>
91
 
        Y=list(Y1,...,Yq) 
92
 
      </literal>
93
 
      �uma lista de q matrizes reais que dependem
94
 
      linearmente das <literal> Xi</literal>'s. A entrada (opcional) <literal>
95
 
        D
96
 
      </literal>
97
 
      cont�m par�metros necess�rios para computar Y como uma fun��o
98
 
      de X (geralmente � uma lista de matrizes).
99
 
    </para>
100
 
    <para>
101
 
      <literal> dimX</literal> � uma matriz p x 2:
102
 
      <literal>dimX(i)=[nri,nci]</literal> � o n�mero real de linhas e colunas
103
 
      da matriz <literal>Xi</literal>. Estas dimens�es determinam
104
 
      <literal>na</literal>, a dimens�o de coluna da matriz resultante
105
 
      <literal>A</literal>: <literal>na=nr1*nc1 +...+ nrp*ncp</literal>.
106
 
    </para>
107
 
    <para>
108
 
      Se o par�metro opcional <literal>flag='sp'</literal> a matriz
109
 
      resultante A � retornada como uma esparsa.
110
 
    </para>
111
 
    <para>Esta fun��o � �til para resolver um sistema de equa��es lineares
112
 
      onde as inc�gnitas s�o matrizes.
113
 
    </para>
114
 
  </refsection>
115
 
  <refsection>
116
 
    <title>Exemplos</title>
117
 
    <programlisting role="example"><![CDATA[ 
118
 
// solucionador de equa��o de Lyapunov (uma inc�gnita, uma restri��o)
119
 
deff('Y=lyapunov(X,D)','[A,Q]=D(:);Xm=X(:); Y=list(A''*Xm+Xm*A-Q)')
120
 
A=rand(3,3);Q=rand(3,3);Q=Q+Q';D=list(A,Q);dimX=[3,3];
121
 
[Aly,bly]=aff2ab(lyapunov,dimX,D);
122
 
[Xl,kerA]=linsolve(Aly,bly); Xv=vec2list(Xl,dimX); lyapunov(Xv,D)
123
 
Xm=Xv(:); A'*Xm+Xm*A-Q
124
 
 
125
 
// solucionador de equa��o de Lyapunov com restri��o redundante X=X'
126
 
// (uma vari�vel, uma restri��o) D � vari�vel global
127
 
deff('Y=ly2(X,D)','[A,Q]=D(:);Xm=X(:); Y=list(A''*Xm+Xm*A-Q,Xm''-Xm)')
128
 
A=rand(3,3);Q=rand(3,3);Q=Q+Q';D=list(A,Q);dimX=[3,3];
129
 
[Aly,bly]=aff2ab(ly2,dimX,D);
130
 
[Xl,kerA]=linsolve(Aly,bly); Xv=vec2list(Xl,dimX); ly2(Xv,D)
131
 
 
132
 
// equa��es de Francis
133
 
// Achando matrizes X1 e X2 tais que:
134
 
// A1*X1 - X1*A2 + B*X2 -A3 = 0
135
 
// D1*X1 -D2 = 0 
136
 
deff('Y=bruce(X,D)','[A1,A2,A3,B,D1,D2]=D(:),...
137
 
[X1,X2]=X(:);Y=list(A1*X1-X1*A2+B*X2-A3,D1*X1-D2)')
138
 
A1=[-4,10;-1,2];A3=[1;2];B=[0;1];A2=1;D1=[0,1];D2=1;
139
 
D=list(A1,A2,A3,B,D1,D2);
140
 
[n1,m1]=size(A1);[n2,m2]=size(A2);[n3,m3]=size(B);
141
 
dimX=[[m1,n2];[m3,m2]];
142
 
[Af,bf]=aff2ab(bruce,dimX,D);
143
 
[Xf,KerAf]=linsolve(Af,bf);Xsol=vec2list(Xf,dimX)
144
 
bruce(Xsol,D)
145
 
 
146
 
// Achando todas as X que comutam com A
147
 
deff('y=f(X,D)','y=list(D(:)*X(:)-X(:)*D(:))')
148
 
A=rand(3,3);dimX=[3,3];[Af,bf]=aff2ab(f,dimX,list(A));
149
 
[Xf,KerAf]=linsolve(Af,bf);[p,q]=size(KerAf);
150
 
Xsol=vec2list(Xf+KerAf*rand(q,1),dimX);
151
 
C=Xsol(:); A*C-C*A
152
 
 ]]></programlisting>
153
 
  </refsection>
154
 
  <refsection role="see also">
155
 
    <title>Ver Tamb�m</title>
156
 
    <simplelist type="inline">
157
 
      <member>
158
 
        <link linkend="linsolve">linsolve</link>
159
 
      </member>
160
 
    </simplelist>
161
 
  </refsection>
162
 
</refentry>