1 <?xml version="1.0" encoding="UTF-8"?>
2 <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="en" xml:id="cheb2mag">
4 <refname>cheb2mag</refname>
5 <refpurpose>response of type 2 Chebyshev filter</refpurpose>
8 <title>Calling Sequence</title>
9 <synopsis>[h2]=cheb2mag(n,omegar,A,sample)</synopsis>
12 <title>Arguments</title>
17 <para>integer ; filter order</para>
23 <para>real scalar : cut-off frequency</para>
29 <para>attenuation in stop band</para>
35 <para>vector of frequencies where cheb2mag is evaluated</para>
41 <para>vector of Chebyshev II filter values at sample points</para>
47 <title>Description</title>
49 Square magnitude response of a type 2 Chebyshev filter.
52 <literal>omegar</literal> = stopband edge, <literal>sample</literal> = vector of
53 frequencies where the square magnitude <literal>h2</literal> is desired.
57 <title>Examples</title>
58 <programlisting role="example"><![CDATA[
59 //Chebyshev; ripple in the stopband
60 n=10;omegar=6;A=1/0.2;sample=0.0001:0.05:10;
61 h2=cheb2mag(n,omegar,A,sample);
62 plot(sample,log(h2)/log(10),'frequencies','magnitude in dB')
64 //Plotting of frequency edges
65 minval=(-max(-log(h2)))/log(10);
66 plot2d([omegar;omegar],[minval;0],[2],"000");
68 //Computation of the attenuation in dB at the stopband edge
69 attenuation=-log(A*A)/log(10);
70 plot2d(sample',attenuation*ones(sample)',[5],"000")
73 <refsection role="see also">
74 <title>See Also</title>
75 <simplelist type="inline">
77 <link linkend="cheb1mag">cheb1mag</link>