<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2008 - INRIA
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->
<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="en" xml:id="ereduc">
    <refnamediv>
        <refname>ereduc</refname>
        <refpurpose>computes  matrix column echelon form by qz transformations</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>[E,Q,Z [,stair [,rk]]]=ereduc(X,tol)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>X</term>
                <listitem>
                    <para>m x n matrix with real  entries.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>tol</term>
                <listitem>
                    <para>real positive scalar.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>E</term>
                <listitem>
                    <para>column echelon form matrix</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>Q</term>
                <listitem>
                    <para>m x m unitary matrix</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>Z</term>
                <listitem>
                    <para>n x n unitary matrix</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>stair</term>
                <listitem>
                    <para>vector of indexes,</para>
                    <variablelist>
                        <varlistentry>
                            <term>*  </term>
                            <listitem>
                                <para>
                                    <literal>ISTAIR(i) = + j</literal>  if the boundary element <literal>E(i,j)</literal> is a   corner point.
                                </para>
                            </listitem>
                        </varlistentry>
                        <varlistentry>
                            <term>*  </term>
                            <listitem>
                                <para>
                                    <literal>ISTAIR(i) = - j</literal>   if the boundary element <literal>E(i,j)</literal> is not a corner point.
                                </para>
                            </listitem>
                        </varlistentry>
                    </variablelist>
                    <para>
                        <literal>(i=1,...,M)</literal>
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>rk</term>
                <listitem>
                    <para>integer, estimated rank of the matrix</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            Given an <literal>m x n</literal> matrix <literal>X</literal> (not necessarily regular) the function
            ereduc computes a unitary transformed matrix <literal>E=Q*X*Z</literal> which is in
            column echelon form (trapezoidal form). Furthermore the rank of
            matrix <literal>X</literal> is determined.
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
X=[1 2 3;4 5 6]
[E,Q,Z ,stair ,rk]=ereduc(X,1.d-15)
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="fstair">fstair</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
