<?xml version="1.0" encoding="UTF-8"?>

<!--
 * Scilab ( https://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="ja" xml:id="csgn">

    <refnamediv>

        <refname>csgn</refname>

        <refpurpose>複素数の実部のベクトル符号を返す</refpurpose>

    </refnamediv>

    <refsynopsisdiv>

        <title>呼出し手順</title>

        <synopsis>s = csgn(z)</synopsis>

    </refsynopsisdiv>

    <refsection>

        <title>引数</title>

        <variablelist>

            <varlistentry>

                <term>z</term>

                <listitem>

                    <para>

                        符号を計算する値のベクトル.

                    </para>

                </listitem>

            </varlistentry>

            <varlistentry>

                <term>s</term>

                <listitem>

                    <para>実部が0に等しくない場合:</para>

                    <itemizedlist>

                        <listitem>

                            <para>

                                ある要素の実部が正の場合<literal>+1</literal>

                            </para>

                        </listitem>

                        <listitem>

                            <para>

                                ある要素の実部が負の場合<literal>-1</literal>

                            </para>

                        </listitem>

                    </itemizedlist>

                    <para>実部が0に等しい場合:</para>

                    <itemizedlist>

                        <listitem>

                            <para>

                                ある要素の虚部が正の場合<literal>+1</literal>

                            </para>

                        </listitem>

                        <listitem>

                            <para>

                                ある要素の虚部が負の場合<literal>-1</literal>

                            </para>

                        </listitem>

                    </itemizedlist>

                    <para>

                        要素が 0の場合,<constant>%nan</constant>を返します

                    </para>

                </listitem>

            </varlistentry>

        </variablelist>

    </refsection>

    <refsection>

        <title>説明</title>

        <para>

            <function>csgn</function>は,

            複素数<varname>z</varname>の実部のベクトルの符号を返します.

        </para>

    </refsection>

    <refsection>

        <title>例</title>

        <programlisting role="example"><![CDATA[
A = [1 1+%i 0 -1 1-%i -1-%i];
csgn(A)
 ]]></programlisting>

    </refsection>

    <refsection role="see also">

        <title>参照</title>

        <simplelist type="inline">

            <member>

                <link linkend="sign">sign</link>

            </member>

            <member>

                <link linkend="signm">signm</link>

            </member>

        </simplelist>

    </refsection>

</refentry>

