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 b5127dd..ddb6a27 100644 (file)
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 //Chebyshev; ripple in the stopband
-n=10;omegar=6;A=1/0.2;samples=0.0001:0.05:10;
+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')
 
@@ -70,16 +73,13 @@ attenuation=-log(A*A)/log(10);
 plot2d(samples',attenuation*ones(samples)',[5],"000")
  ]]></programlisting>
         <scilab:image><![CDATA[
-//Chebyshev; ripple in the stopband
 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);
 plot2d([omegar;omegar],[minval;0],[2],"000");
 
-//Computation of the attenuation in dB at the stopband edge
 attenuation=-log(A*A)/log(10);
 plot2d(samples',attenuation*ones(samples)',[5],"000")
 ]]>     </scilab:image>