<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>linsolve</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE>April 1993</DATE>
  <SHORT_DESCRIPTION name="linsolve"> linear equation solver</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>[x0,kerA]=linsolve(A,b [,x0])  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>A</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: a <VERB>na x ma</VERB> real matrix (possibly sparse)</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>b</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: a <VERB>na x 1</VERB> vector (same row dimension as <VERB>A</VERB>)</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>x0</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: a real vector</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>kerA</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: a <VERB>ma x k</VERB> real matrix</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P><VERB>linsolve</VERB>  computes all the solutions to <VERB> A*x+b=0</VERB>.</P>
    <P><VERB>x0</VERB> is a particular solution (if any) and <VERB> kerA= </VERB>nullspace
    of <VERB>A</VERB>. Any <VERB>x=x0+kerA*w</VERB> with arbitrary <VERB>w</VERB> satisfies
    <VERB> A*x+b=0</VERB>.</P>
    <P>
    If compatible <VERB>x0</VERB> is given on entry, <VERB>x0</VERB> is returned. If not
    a compatible <VERB>x0</VERB>, if any, is returned.</P>
  </DESCRIPTION>
  <EXAMPLE>
<![CDATA[
A=rand(5,3)*rand(3,8);
b=A*ones(8,1);[x,kerA]=linsolve(A,b);A*x+b   //compatible b
b=ones(5,1);[x,kerA]=linsolve(A,b);A*x+b   //uncompatible b
A=rand(5,5);[x,kerA]=linsolve(A,b), -inv(A)*b  //x is unique
 ]]>
  </EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>inv</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>pinv</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>colcomp</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>im_inv</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
</MAN>
