linsolve.xml updated - examples replaced by demos.
[scilab.git] / scilab / modules / linear_algebra / help / pt_BR / linear / linsolve.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) 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:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="linsolve" xml:lang="pt">
17     <refnamediv>
18         <refname>linsolve</refname>
19         <refpurpose>solucionador de equações lineares</refpurpose>
20     </refnamediv>
21     <refsynopsisdiv>
22         <title>Seqüência de Chamamento</title>
23         <synopsis>[x0,kerA]=linsolve(A,b [,x0])</synopsis>
24     </refsynopsisdiv>
25     <refsection>
26         <title>Parâmetros</title>
27         <variablelist>
28             <varlistentry>
29                 <term>A</term>
30                 <listitem>
31                     <para>
32                         uma matriz <literal>na x ma</literal> de reais (possivelmente
33                         esparsa)
34                     </para>
35                 </listitem>
36             </varlistentry>
37             <varlistentry>
38                 <term>b</term>
39                 <listitem>
40                     <para>
41                         um vetor <literal>na x 1</literal> (mesma dimensão de linha de
42                         <literal>A</literal>)
43                     </para>
44                 </listitem>
45             </varlistentry>
46             <varlistentry>
47                 <term>x0</term>
48                 <listitem>
49                     <para>um vetor de reais </para>
50                 </listitem>
51             </varlistentry>
52             <varlistentry>
53                 <term>kerA</term>
54                 <listitem>
55                     <para>
56                         uma matriz <literal>ma x k</literal> de reais
57                     </para>
58                 </listitem>
59             </varlistentry>
60         </variablelist>
61     </refsection>
62     <refsection>
63         <title>Descrição</title>
64         <para>
65             <literal>linsolve</literal> computa todas as soluções para <literal>
66                 A*x+b=0
67             </literal>
68             .
69         </para>
70         <para>
71             <literal>x0</literal> é uma solução particular (se houver) e
72             <literal> kerA= </literal>núcleo de <literal>A</literal>. Qualquer
73             <literal>x=x0+kerA*w</literal> com <literal>w</literal> arbitrário
74             satisfaz <literal> A*x+b=0</literal>.
75         </para>
76         <para>
77             Se um compatible <literal>x0</literal> compatível é dado na entrada,
78             <literal>x0</literal> é retornado. Senão, um <literal>x0</literal>,
79             compatível é retornado, se houver.
80         </para>
81     </refsection>
82     <refsection>
83         <title>Exemplos</title>
84         <programlisting role="example"><![CDATA[
85 A=rand(5,3)*rand(3,8);
86 b=A*ones(8,1);[x,kerA]=linsolve(A,b);A*x+b   //b comatível
87 b=ones(5,1);[x,kerA]=linsolve(A,b);A*x+b   //b incompatível
88 A=rand(5,5);[x,kerA]=linsolve(A,b), -inv(A)*b  //x é único
89
90 // A benchmark of sparse linear solver
91
92 [A,descr,ref,mtype] = ReadHBSparse(SCI+"/modules/umfpack/demos/bcsstk24.rsa");
93
94 b = zeros(size(A,1),1);
95
96 tic();
97 res = umfpack(A,'\',b);
98 mprintf('\ntime needed to solve the system with umfpack: %.3f\n',toc());
99
100 tic();
101 res = linsolve(A,b);
102 mprintf('\ntime needed to solve the system with linsolve: %.3f\n',toc());
103
104 tic();
105 res = A\b;
106 mprintf('\ntime needed to solve the system with the backslash operator: %.3f\n',toc());
107  ]]></programlisting>
108     </refsection>
109     <refsection>
110         <title> Ver Também</title>
111         <simplelist type="inline">
112             <member>
113                 <link linkend="inv">inv</link>
114             </member>
115             <member>
116                 <link linkend="pinv">pinv</link>
117             </member>
118             <member>
119                 <link linkend="colcomp">colcomp</link>
120             </member>
121             <member>
122                 <link linkend="im_inv">im_inv</link>
123             </member>
124             <member>
125                 <link linkend="backslash">backslash</link>
126             </member>
127             <member>
128                 <link linkend="umfpack">umfpack</link>
129             </member>
130         </simplelist>
131     </refsection>
132 </refentry>