Rename the variable in the cheb2mag function. It was overriding a Scilab function...
[scilab.git] / scilab / modules / signal_processing / help / en_US / filters / cheb2mag.xml
index 2c180d2..ddb6a27 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<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" version="5.0-subset Scilab" xml:lang="en" xml:id="cheb2mag">
+<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">
     <refnamediv>
         <refname>cheb2mag</refname>
-        <refpurpose> response of type 2 Chebyshev filter</refpurpose>
+        <refpurpose>response of type 2 Chebyshev filter</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Calling Sequence</title>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 //Chebyshev; ripple in the stopband
-n=10;omegar=6;A=1/0.2;sample=0.0001:0.05:10;
-h2=cheb2mag(n,omegar,A,sample);
-plot(sample,log(h2)/log(10),'frequencies','magnitude in dB')
+n=10;
+omegar=6;
+A=1/0.2;
+samples=0.0001:0.05:10;
+h2=cheb2mag(n,omegar,A,samples);
+plot(samples,log(h2)/log(10),'frequencies','magnitude in dB')
 
 //Plotting of frequency edges
 minval=(-max(-log(h2)))/log(10);
@@ -67,8 +70,19 @@ plot2d([omegar;omegar],[minval;0],[2],"000");
 
 //Computation of the attenuation in dB at the stopband edge
 attenuation=-log(A*A)/log(10);
-plot2d(sample',attenuation*ones(sample)',[5],"000")
+plot2d(samples',attenuation*ones(samples)',[5],"000")
  ]]></programlisting>
+        <scilab:image><![CDATA[
+n=10;omegar=6;A=1/0.2;samples=0.0001:0.05:10;
+h2=cheb2mag(n,omegar,A,samples);
+plot(samples,log(h2)/log(10),'frequencies','magnitude in dB')
+
+minval=(-max(-log(h2)))/log(10);
+plot2d([omegar;omegar],[minval;0],[2],"000");
+
+attenuation=-log(A*A)/log(10);
+plot2d(samples',attenuation*ones(samples)',[5],"000")
+]]>     </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>