<?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
 * Copyright (C) 2019 - Samuel GOUGEON
 *
 * 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:ns5="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
          xmlns:scilab="http://www.scilab.org" xml:id="coth" xml:lang="ja">

    <refnamediv>

        <refname>coth</refname>

        <refpurpose>双曲線コタンジェント(余接)</refpurpose>

    </refnamediv>

    <refsynopsisdiv>

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

        <synopsis>t = coth(x)</synopsis>

    </refsynopsisdiv>

    <refsection>

        <title>引数</title>

        <variablelist>

            <varlistentry>

                <term>x</term>

                <listitem>

                    <para>実数または複素数のベクトルまたは行列.</para>

                </listitem>

            </varlistentry>

            <varlistentry>

                <term>t</term>

                <listitem>

                    <para>実数または複素数のベクトルまたは行列.</para>

                </listitem>

            </varlistentry>

        </variablelist>

    </refsection>

    <refsection>

        <title>説明</title>

        <para>

            <varname>t</varname>の要素は

            <varname>x</varname>の要素の双曲線コタンジェント(余接)と

            なります.

        </para>
        <note>
          <literal>coth(0)</literal> not being 0, the result for any input
          sparse-encoded matrix is always full-encoded (as for <literal>cos()</literal>).
        </note>

    </refsection>

    <refsection>
        <title>例</title>
        <programlisting role="example"><![CDATA[
x = [1, 2*%i]
t = exp(x);
(t-ones(x)./t).\(t+ones(x)./t)
coth(x)
coth([-0 0])

// With sparses:
s = sparse([1 1; 3 1; 2 2; 2 3; 1 3],[0.02 0.7 0.15 0.4 3],[3 3])
coth(s)   // no longer sparse
 ]]></programlisting>
    <screen>
--> (t-ones(x)./t).\(t+ones(x)./t)
 ans  =
   1.3130353   0.4576576i

--> coth(x)
 ans  =
   1.3130353   0.4576576i

--> coth([-0 0])
 ans  =
  -Inf   Inf

--> // With sparses:
--> s = sparse([1 1; 3 1; 2 2; 2 3; 1 3],[0.02 0.7 0.15 0.4 3],[3 3])
 s  =
(  3,  3) sparse matrix
(  1,  1)      0.02
(  1,  3)      3.
(  2,  2)      0.15
(  2,  3)      0.4
(  3,  1)      0.7

--> coth(s)   // no longer sparse
 ans  =
   50.006666   Inf         1.0049698
   Inf         6.7165918   2.6319324
   1.6546216   Inf         Inf
</screen>
    </refsection>

    <refsection role="see also">

        <title>参照</title>

        <simplelist type="inline">

            <member>

                <link linkend="cotg">cotg</link>

            </member>

        </simplelist>

    </refsection>
    <refsection role="history">
        <title>履歴</title>
        <revhistory>
            <revision>
                <revnumber>6.1.0</revnumber>
                <revdescription>
                    Extension to sparse matrices.
                </revdescription>
            </revision>
        </revhistory>
    </refsection>
</refentry>

