<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2008 - INRIA
 * Copyright (C) 2015 - Samuel GOUGEON
 * 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="fr" xml:id="imag">
    <refnamediv>
        <refname>imag</refname>
        <refpurpose>partie imaginaire de nombres, polynômes ou fractions complexes</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntaxe</title>
        <synopsis>y = imag(x)</synopsis>
    </refsynopsisdiv>
    <refsection role="parameters">
        <title>Paramètres</title>
        <variablelist>
            <varlistentry>
                <term>x  </term>
                <listitem>
                    <para>Matrice réelle ou complexe (dense ou creuse). Matrice
                    de polynômes ou de fractions rationnelles à coefficients réels ou complexes.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>y  </term>
                <listitem>
                    <para>matrice de nombres réels, ou de polynômes ou fractions
                    rationnelles à coefficients réels. <varname>x</varname> et
                    <varname>y</varname> ont la même taille.
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection role="description">
        <title>Description</title>
        <para>
            <literal>imag(x)</literal> renvoie la partie imaginaire de
            <literal>x</literal> (voir <literal> %i</literal> pour entrer des nombres complexes).
        </para>
    </refsection>

    <refsection role="examples">
        <title>Exemples</title>
        <programlisting role="example"><![CDATA[
c = [ 2 %i, 1+0*%i, 2-3*%i  log(-1) (-1)^(1/3) ]
imag(c)

s = sprand(3,3,0.3) + sprand(3,3,0.3)*%i
imag(s)

// Polynômes complexes :
A = [1-%i*%z (%z-%i)^2]
imag(A)

// Fractions rationnelles complexes :
A = [ %z/(1-%z)  (1-%z)/%z^2];
B = A(1,[2 1]);
C = A + %i*B
B, imag(C)
 ]]></programlisting>
    </refsection>

    <refsection role="see also">
        <title>Voir aussi</title>
        <simplelist type="inline">
            <member>
                <link linkend="real">real</link>
            </member>
        </simplelist>
    </refsection>
    <refsection role="history">
        <title>Historique</title>
        <revhistory>
            <revision>
                <revnumber>6.0</revnumber>
                <revdescription>Extension aux fractions rationnelles
                </revdescription>
            </revision>
        </revhistory>
    </refsection>
</refentry>
