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