06a67de8c5abfcf0807397bebe4322b41d6873b6
1 <?xml version="1.0" encoding="UTF-8"?>
3     <refnamediv>
4         <refname>%sn</refname>
5         <refpurpose>Jacobi's elliptic function</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Syntax</title>
9         <synopsis>[y]=%sn(x,m)</synopsis>
10     </refsynopsisdiv>
11     <refsection>
12         <title>Arguments</title>
13         <variablelist>
14             <varlistentry>
15                 <term>x</term>
16                 <listitem>
17                     <para>
18                         a point inside the fundamental rectangle  defined by the elliptic integral; <literal>x</literal> is a vector of complex numbers
19                     </para>
20                 </listitem>
21             </varlistentry>
22             <varlistentry>
23                 <term>m</term>
24                 <listitem>
25                     <para>
26                         parameter of the elliptic integral (<literal>0&lt;m&lt;1</literal>)
27                     </para>
28                 </listitem>
29             </varlistentry>
30             <varlistentry>
31                 <term>y</term>
32                 <listitem>
33                     <para>result</para>
34                 </listitem>
35             </varlistentry>
36         </variablelist>
37     </refsection>
38     <refsection>
39         <title>Description</title>
40         <para>
41             Jacobi 's sn elliptic function with parameter <literal>m</literal>: the inverse
42             of the elliptic integral for the parameter <literal>m</literal>.
43         </para>
44         <para>
45             The amplitude am is computed in fortran and
46             the addition formulas for elliptic functions are applied
47         </para>
48     </refsection>
49     <refsection>
50         <title>Examples</title>
51         <programlisting role="example"><![CDATA[
52 m=0.36;
53 K=%k(m);
54 P=4*K; //Real period
55 real_val=0:(P/50):P;
56 plot(real_val,real(%sn(real_val,m)))
57  ]]></programlisting>
58         <scilab:image>
59             m=0.36;
60             K=%k(m);
61             P=4*K;
62             real_val=0:(P/50):P;
63             plot(real_val,real(%sn(real_val,m)))
64         </scilab:image>
65         <programlisting role="example"><![CDATA[
66 clf();
67 m=0.36;
68 KK=%k(1-m);
69 Ip=2*KK;
70 ima_val1=0:(Ip/50):KK-0.001;
71 ima_val2=(KK+0.05):(Ip/25):(Ip+KK);
72 z1=%sn(%i*ima_val1,m);
73 z2=%sn(%i*ima_val2,m);
74 plot2d([ima_val1',ima_val2'],[imag(z1)',imag(z2)']);
75 xgrid(3)
76  ]]></programlisting>
77         <scilab:image>
78             m=0.36;
79             KK=%k(1-m);
80             Ip=2*KK;
81             ima_val1=0:(Ip/50):KK-0.001;
82             ima_val2=(KK+0.05):(Ip/25):(Ip+KK);
83             z1=%sn(%i*ima_val1,m);
84             z2=%sn(%i*ima_val2,m);
85             plot2d([ima_val1',ima_val2'],[imag(z1)',imag(z2)']);
86             xgrid(3)
87         </scilab:image>
88     </refsection>
89     <refsection role="see also">
90         <title>See also</title>
91         <simplelist type="inline">
92             <member>