<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>balanc</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE>April 1993</DATE>
  <SHORT_DESCRIPTION name="balanc"> matrix or pencil balancing</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>[Ab,X]=balanc(A)  </CALLING_SEQUENCE_ITEM>
    <CALLING_SEQUENCE_ITEM>[Eb,Ab,X,Y]=balanc(E,A)  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>A:  </PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>a real square matrix</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>X:  </PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>a real square invertible matrix</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>E:  </PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>a real square matrix (same dimension as <VERB>A</VERB>)</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>Y:  </PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>a real square invertible matrix.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P>
    Balance a square matrix to improve
    its condition number.</P>
    <P><VERB>[Ab,X] = balanc(A)</VERB> finds a similarity transformation
    <VERB>X</VERB> such that</P>
    <P><VERB>Ab = inv(X)*A*X</VERB> has approximately equal row and column norms.</P>
    <P>
    For matrix pencils,balancing is done for improving the
    generalized eigenvalue problem.</P>
    <P><VERB>[Eb,Ab,X,Y] = balanc(E,A)</VERB> returns left and right transformations <VERB>X</VERB> and <VERB>Y</VERB>
    such that <VERB>Eb=inv(X)*E*Y,  Ab=inv(X)*A*Y</VERB></P>
  </DESCRIPTION>
  <SECTION label="Remark">
    <P>
    Balancing is made in the functions <VERB>bdiag</VERB> and <VERB>spec</VERB>.</P>
  </SECTION>
  <EXAMPLE>
<![CDATA[
A=[1/2^10,1/2^10;2^10,2^10];
[Ab,X]=balanc(A);
norm(A(1,:))/norm(A(2,:))
norm(Ab(1,:))/norm(Ab(2,:))
 ]]>
  </EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>bdiag</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>spec</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>schur</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
</MAN>
