156ead155e324575e0d76ac8bdfa8415060b53e5
[scilab.git] / scilab / modules / linear_algebra / help / ja_JP / linear / aff2ab.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="ja" xml:id="aff2ab">
14     <refnamediv>
15         <refname>aff2ab</refname>
16         <refpurpose>線形 (アフィン)関数を A,b に変換</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>呼び出し手順</title>
20         <synopsis>[A,b]=aff2ab(afunction,dimX,D [,flag])</synopsis>
21     </refsynopsisdiv>
22     <refsection>
23         <title>Parameters</title>
24         <variablelist>
25             <varlistentry>
26                 <term>afunction</term>
27                 <listitem>
28                     <para>
29                         scilab 関数 <literal> Y =fct(X,D) </literal> 
30                         ただし, <literal>X, D, Y</literal> は行列の <literal>list</literal>
31                     </para>
32                 </listitem>
33             </varlistentry>
34             <varlistentry>
35                 <term>dimX</term>
36                 <listitem>
37                     <para>
38                         p x 2 整数行列 (<literal>p</literal> は
39                         <literal>X</literal>の行列の数)
40                     </para>
41                 </listitem>
42             </varlistentry>
43             <varlistentry>
44                 <term>D</term>
45                 <listitem>
46                     <para>
47                         実数行列の<literal>list</literal>  (または任意の有効なScilab オブジェクト).
48                     </para>
49                 </listitem>
50             </varlistentry>
51             <varlistentry>
52                 <term>flag</term>
53                 <listitem>
54                     <para>
55                         オプションのパラメータ (<literal>flag='f'</literal> または <literal>flag='sp'</literal>)
56                     </para>
57                 </listitem>
58             </varlistentry>
59             <varlistentry>
60                 <term>A</term>
61                 <listitem>
62                     <para>実数行列</para>
63                 </listitem>
64             </varlistentry>
65             <varlistentry>
66                 <term>b</term>
67                 <listitem>
68                     <para>
69                         <literal>A</literal>と同じ行次元を有する実数ベクトル
70                     </para>
71                 </listitem>
72             </varlistentry>
73         </variablelist>
74     </refsection>
75     <refsection>
76         <title>説明</title>
77         <para>
78             <literal>aff2ab</literal>  はアフィン関数の(正準形式の)行列表現を返します.
79         </para>
80         <para>
81             <literal>afunction</literal> は以下の規定の構文を有する関数です:
82             <literal> Y=afunction(X,D) </literal> 
83             ただし, <literal> X=list(X1,X2,...,Xp) </literal> は
84             p 個の実数行列のリスト,<literal> Y=list(Y1,...,Yq) </literal> は
85             <literal> Xi</literal>に線形に依存するq 個の実数行列のリストです.
86             (オプションの) 入力 <literal> D</literal> は, X の関数として
87             Yを計算するために必要なパラメータを有しています.
88         </para>
89         <para>
90             <literal> dimX</literal> は p x 2 行列です: <literal>dimX(i)=[nri,nci]</literal>
91             は行列<literal>Xi</literal>の行と列の実際の数です.
92             これらの次元は,結果の行列<literal>A</literal>の列の次元である
93             <literal>na</literal> を以下のように定義します:
94             <literal>na=nr1*nc1 +...+ nrp*ncp</literal>.
95         </para>
96         <para>
97             オプションのパラメータ <literal>flag='sp'</literal> が指定された場合,
98             結果の行列 <literal>A</literal>は疎行列として返されます.
99         </para>
100         <para>
101             この関数は,未知変数が行列であるような
102             線形方程式のシステムを解くために有用です.
103         </para>
104     </refsection>
105     <refsection>
106         <title>例</title>
107         <programlisting role="example"><![CDATA[ 
108 // リアプノフ方程式ソルバ (未知変数1つ, 拘束条件1つ)
109 deff('Y=lyapunov(X,D)','[A,Q]=D(:);Xm=X(:); Y=list(A''*Xm+Xm*A-Q)')
110 A=rand(3,3);Q=rand(3,3);Q=Q+Q';D=list(A,Q);dimX=[3,3];
111 [Aly,bly]=aff2ab(lyapunov,dimX,D);
112 [Xl,kerA]=linsolve(Aly,bly); Xv=vec2list(Xl,dimX); lyapunov(Xv,D)
113 Xm=Xv(:); A'*Xm+Xm*A-Q
114 // 冗長な拘束 t X=X'を有するリアプノフ方程式ソルバ
115 // (変数1つ, 拘束条件2つt) D はグローバル変数
116 deff('Y=ly2(X,D)','[A,Q]=D(:);Xm=X(:); Y=list(A''*Xm+Xm*A-Q,Xm''-Xm)')
117 A=rand(3,3);Q=rand(3,3);Q=Q+Q';D=list(A,Q);dimX=[3,3];
118 [Aly,bly]=aff2ab(ly2,dimX,D);
119 [Xl,kerA]=linsolve(Aly,bly); Xv=vec2list(Xl,dimX); ly2(Xv,D)
120 // フランシス方程式
121 // 以下のような行列 X1 および X2 を見つける:
122 // A1*X1 - X1*A2 + B*X2 -A3 = 0
123 // D1*X1 -D2 = 0 
124 deff('Y=bruce(X,D)','[A1,A2,A3,B,D1,D2]=D(:),...
125 [X1,X2]=X(:);Y=list(A1*X1-X1*A2+B*X2-A3,D1*X1-D2)')
126 A1=[-4,10;-1,2];A3=[1;2];B=[0;1];A2=1;D1=[0,1];D2=1;
127 D=list(A1,A2,A3,B,D1,D2);
128 [n1,m1]=size(A1);[n2,m2]=size(A2);[n3,m3]=size(B);
129 dimX=[[m1,n2];[m3,m2]];
130 [Af,bf]=aff2ab(bruce,dimX,D);
131 [Xf,KerAf]=linsolve(Af,bf);Xsol=vec2list(Xf,dimX)
132 bruce(Xsol,D)
133 // Aを変換する全てのXを見つける
134 deff('y=f(X,D)','y=list(D(:)*X(:)-X(:)*D(:))')
135 A=rand(3,3);dimX=[3,3];[Af,bf]=aff2ab(f,dimX,list(A));
136 [Xf,KerAf]=linsolve(Af,bf);[p,q]=size(KerAf);
137 Xsol=vec2list(Xf+KerAf*rand(q,1),dimX);
138 C=Xsol(:); A*C-C*A
139  ]]></programlisting>
140     </refsection>
141     <refsection role="see also">
142         <title>参照</title>
143         <simplelist type="inline">
144             <member>
145                 <link linkend="linsolve">linsolve</link>
146             </member>
147         </simplelist>
148     </refsection>
149 </refentry>