1 <?xml version="1.0" encoding="UTF-8"?>
3     <refnamediv>
4         <refname>ell1mag</refname>
5         <refpurpose>magnitude of elliptic filter</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Syntax</title>
9         <synopsis>[v]=ell1mag(eps,m1,z)</synopsis>
10     </refsynopsisdiv>
11     <refsection>
12         <title>Arguments</title>
13         <variablelist>
14             <varlistentry>
15                 <term>eps</term>
16                 <listitem>
17                     <para>
18                         passband ripple=<literal>1/(1+eps^2)</literal>
19                     </para>
20                 </listitem>
21             </varlistentry>
22             <varlistentry>
23                 <term>m1</term>
24                 <listitem>
25                     <para>
26                         stopband ripple=<literal>1/(1+(eps^2)/m1)</literal>
27                     </para>
28                 </listitem>
29             </varlistentry>
30             <varlistentry>
31                 <term>z</term>
32                 <listitem>
33                     <para>sample vector of values in the complex plane</para>
34                 </listitem>
35             </varlistentry>
36             <varlistentry>
37                 <term>v</term>
38                 <listitem>
39                     <para>elliptic filter values at sample points</para>
40                 </listitem>
41             </varlistentry>
42         </variablelist>
43     </refsection>
44     <refsection>
45         <title>Description</title>
46         <para>
47             Function used for squared magnitude of an elliptic filter.
48             Usually <literal>m1=eps*eps/(a*a-1)</literal>. Returns
49             <literal>v=real(ones(z)./(ones(z)+eps*eps*s.*s))</literal> for <literal>s=ellipj(z,m1)</literal>.
50         </para>
51     </refsection>
52     <refsection>
53         <title>Examples</title>
54         <programlisting role="example"><![CDATA[
55 deff('[alpha,BeTa]=alpha_beta(n,m,m1)',...
56 'if 2*int(n/2)==n then, BeTa=K1; else, BeTa=0;end;'+...
57 'alpha=%k(1-m1)/%k(1-m);')
58 epsilon=0.1;A=10;  //ripple parameters
59 m1=(epsilon*epsilon)/(A*A-1);n=5;omegac=6;
60 m=find_freq(epsilon,A,n);omegar = omegac/sqrt(m)
61 %k(1-m1)*%k(m)/(%k(m1)*%k(1-m))-n   //Check...
62 [alpha,Beta]=alpha_beta(n,m,m1)
63 alpha*delip(1,sqrt(m))-n*%k(m1)      //Check
64 samples=0:0.01:20;
65 //Now we map the positive real axis into the contour...
66 z=alpha*delip(samples/omegac,sqrt(m))+Beta*ones(samples);
67 plot(samples,ell1mag(epsilon,m1,z))
68  ]]></programlisting>
69         <scilab:image><![CDATA[
70 deff('[alpha,BeTa]=alpha_beta(n,m,m1)',...
71 'if 2*int(n/2)==n then, BeTa=K1; else, BeTa=0;end;'+...
72 'alpha=%k(1-m1)/%k(1-m);')
73 epsilon=0.1;A=10;  //ripple parameters
74 m1=(epsilon*epsilon)/(A*A-1);n=5;omegac=6;
75 m=find_freq(epsilon,A,n);omegar = omegac/sqrt(m)
76 %k(1-m1)*%k(m)/(%k(m1)*%k(1-m))-n   //Check...
77 [alpha,Beta]=alpha_beta(n,m,m1)
78 alpha*delip(1,sqrt(m))-n*%k(m1)      //Check
79 samples=0:0.01:20;
80 //Now we map the positive real axis into the contour...
81 z=alpha*delip(samples/omegac,sqrt(m))+Beta*ones(samples);
82 plot(samples,ell1mag(epsilon,m1,z))
83 ]]>     </scilab:image>
84     </refsection>
85     <refsection role="see also">
86         <title>See also</title>
87         <simplelist type="inline">
88             <member>