097b0b4a2f96894572f0b1981fe0fca3b8e6997d
[scilab.git] / scilab / modules / linear_algebra / help / ja_JP / linear / linsolve.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="linsolve">
14     <refnamediv>
15         <refname>linsolve</refname>
16         <refpurpose>線形方程式ソルバ</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>呼び出し手順</title>
20         <synopsis>[x0,kerA]=linsolve(A,b [,x0])</synopsis>
21     </refsynopsisdiv>
22     <refsection>
23         <title>パラメータ</title>
24         <variablelist>
25             <varlistentry>
26                 <term>A</term>
27                 <listitem>
28                     <para>
29                         a <literal>na x ma</literal> 実数行列 (疎行列の場合もあり)
30                     </para>
31                 </listitem>
32             </varlistentry>
33             <varlistentry>
34                 <term>b</term>
35                 <listitem>
36                     <para>
37                         <literal>na x 1</literal>ベクトル (<literal>A</literal>の行と同じ次元)
38                     </para>
39                 </listitem>
40             </varlistentry>
41             <varlistentry>
42                 <term>x0</term>
43                 <listitem>
44                     <para>実数ベクトル</para>
45                 </listitem>
46             </varlistentry>
47             <varlistentry>
48                 <term>kerA</term>
49                 <listitem>
50                     <para>
51                         <literal>ma x k</literal> 実数行列
52                     </para>
53                 </listitem>
54             </varlistentry>
55         </variablelist>
56     </refsection>
57     <refsection>
58         <title>説明</title>
59         <para>
60             <literal>linsolve</literal>  は,
61             <literal> A*x+b=0</literal>の解を全て計算します.
62         </para>
63         <para>
64             <literal>x0</literal> は特解 (存在する場合),
65             <literal> kerA </literal> は<literal>A</literal>のヌル空間です.
66             任意の<literal>w</literal>について<literal>x=x0+kerA*w</literal>は,
67             <literal> A*x+b=0</literal>を満たします.
68         </para>
69         <para>
70             互換性のある <literal>x0</literal> がエントリに指定された場合, <literal>x0</literal>が返されます. 
71             そうでない場合,<literal>x0</literal>と互換性のあるもの(存在する場合)が返されます.
72         </para>
73     </refsection>
74     <refsection>
75         <title>例</title>
76         <programlisting role="example"><![CDATA[ 
77 A=rand(5,3)*rand(3,8);
78 b=A*ones(8,1);[x,kerA]=linsolve(A,b);A*x+b   //compatible b
79 b=ones(5,1);[x,kerA]=linsolve(A,b);A*x+b   //uncompatible b
80 A=rand(5,5);[x,kerA]=linsolve(A,b), -inv(A)*b  //x is unique
81 // Benchmark with other linear sparse solver:
82 [A,descr,ref,mtype] = ReadHBSparse(SCI+"/modules/umfpack/examples/bcsstk24.rsa"); 
83 b = zeros(size(A,1),1);
84 tic();
85 res = umfpack(A,'\',b);
86 mprintf('\ntime needed to solve the system with umfpack: %.3f\n',toc());
87 tic();
88 res = linsolve(A,b);
89 mprintf('\ntime needed to solve the system with linsolve: %.3f\n',toc());
90 tic();
91 res = A\b;
92 mprintf('\ntime needed to solve the system with the backslash operator: %.3f\n',toc());
93  ]]></programlisting>
94     </refsection>
95     <refsection role="see also">
96         <title>参照</title>
97         <simplelist type="inline">
98             <member>
99                 <link linkend="inv">inv</link>
100             </member>
101             <member>
102                 <link linkend="pinv">pinv</link>
103             </member>
104             <member>
105                 <link linkend="colcomp">colcomp</link>
106             </member>
107             <member>
108                 <link linkend="im_inv">im_inv</link>
109             </member>
110             <member>
111                 <link linkend="umfpack">umfpack</link>
112             </member>
113             <member>
114                 <link linkend="backslash">backslash</link>
115             </member>
116         </simplelist>
117     </refsection>
118 </refentry>