1 <?xml version="1.0" encoding="ISO-8859-1"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2008 - INRIA
6 * Copyright (C) 2012 - 2016 - Scilab Enterprises
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.
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">
18 <refname>linsolve</refname>
19 <refpurpose>solucionador de equações lineares</refpurpose>
22 <title>Seqüência de Chamamento</title>
23 <synopsis>[x0,kerA]=linsolve(A,b [,x0])</synopsis>
26 <title>Parâmetros</title>
32 uma matriz <literal>na x ma</literal> de reais (possivelmente
41 um vetor <literal>na x 1</literal> (mesma dimensão de linha de
49 <para>um vetor de reais </para>
56 uma matriz <literal>ma x k</literal> de reais
63 <title>Descrição</title>
65 <literal>linsolve</literal> computa todas as soluções para <literal>
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>.
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.
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
90 // A benchmark of sparse linear solver
92 [A,descr,ref,mtype] = ReadHBSparse(SCI+"/modules/umfpack/demos/bcsstk24.rsa");
94 b = zeros(size(A,1),1);
97 res = umfpack(A,'\',b);
98 mprintf('\ntime needed to solve the system with umfpack: %.3f\n',toc());
102 mprintf('\ntime needed to solve the system with linsolve: %.3f\n',toc());
106 mprintf('\ntime needed to solve the system with the backslash operator: %.3f\n',toc());
110 <title> Ver Também</title>
111 <simplelist type="inline">
113 <link linkend="inv">inv</link>
116 <link linkend="pinv">pinv</link>
119 <link linkend="colcomp">colcomp</link>
122 <link linkend="im_inv">im_inv</link>
125 <link linkend="backslash">backslash</link>
128 <link linkend="umfpack">umfpack</link>