1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2008 - INRIA
5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 * Copyright (C) 2019 - Samuel GOUGEON
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
17 xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
19 xmlns:scilab="http://www.scilab.org" xml:id="cotd" xml:lang="en">
21 <refname>cotd</refname>
22 <refpurpose>element-wise cotangent function, argument in degree</refpurpose>
26 <synopsis>y = cotd(x)</synopsis>
29 <title>Arguments</title>
34 <para>a real array.</para>
40 <para>a real array with same dimensions as
48 <title>Description</title>
50 The entries of <varname>y</varname> are the cotangents of the
51 corresponding entries of <varname>x</varname> supposed to be given in
52 degree. <code>t=cos(x)./sin(x)</code>. For entries equal to
53 <literal>n*180</literal> with <literal>n</literal> integer, the results
54 are infinite, whereas <code>cotg(n*%pi)</code> is large but finite
55 because <constant>%pi</constant> cannot be represented exactly. For entries
56 equal to <literal>n*90</literal> with <literal>n</literal> integers and
57 odd the results are exactly <literal>0</literal>.
61 <title>Examples</title>
62 <programlisting role="example"><![CDATA[
64 cotd([-180 -90 0 90 180])
67 --> cotd([30 45 60 90])
69 1.7320508 1. 0.5773503 0.
71 --> cotd([-180 -90 0 90 180])
76 <refsection role="see also">
77 <title>See also</title>
78 <simplelist type="inline">
80 <link linkend="cotg">cotg</link>
83 <link linkend="coth">coth</link>
86 <link linkend="tan">tan</link>
89 <link linkend="tand">tand</link>