add CDATA + role in the signal_processing module
Yann Collette [Fri, 4 Sep 2009 11:41:58 +0000 (13:41 +0200)]
52 files changed:
scilab/modules/signal_processing/help/en_US/analpf.xml
scilab/modules/signal_processing/help/en_US/bilt.xml
scilab/modules/signal_processing/help/en_US/buttmag.xml
scilab/modules/signal_processing/help/en_US/casc.xml
scilab/modules/signal_processing/help/en_US/cepstrum.xml
scilab/modules/signal_processing/help/en_US/cheb1mag.xml
scilab/modules/signal_processing/help/en_US/cheb2mag.xml
scilab/modules/signal_processing/help/en_US/chepol.xml
scilab/modules/signal_processing/help/en_US/convol.xml
scilab/modules/signal_processing/help/en_US/corr.xml
scilab/modules/signal_processing/help/en_US/cspect.xml
scilab/modules/signal_processing/help/en_US/czt.xml
scilab/modules/signal_processing/help/en_US/detrend.xml
scilab/modules/signal_processing/help/en_US/dft.xml
scilab/modules/signal_processing/help/en_US/ell1mag.xml
scilab/modules/signal_processing/help/en_US/eqfir.xml
scilab/modules/signal_processing/help/en_US/eqiir.xml
scilab/modules/signal_processing/help/en_US/faurre.xml
scilab/modules/signal_processing/help/en_US/fft.xml
scilab/modules/signal_processing/help/en_US/fft2.xml
scilab/modules/signal_processing/help/en_US/fftshift.xml
scilab/modules/signal_processing/help/en_US/filt_sinc.xml
scilab/modules/signal_processing/help/en_US/filter.xml
scilab/modules/signal_processing/help/en_US/frfit.xml
scilab/modules/signal_processing/help/en_US/frmag.xml
scilab/modules/signal_processing/help/en_US/fsfirlin.xml
scilab/modules/signal_processing/help/en_US/group.xml
scilab/modules/signal_processing/help/en_US/hank.xml
scilab/modules/signal_processing/help/en_US/hilb.xml
scilab/modules/signal_processing/help/en_US/hilbert.xml
scilab/modules/signal_processing/help/en_US/howto/DesignEllipticFilter.xml
scilab/modules/signal_processing/help/en_US/iir.xml
scilab/modules/signal_processing/help/en_US/levin.xml
scilab/modules/signal_processing/help/en_US/mfft.xml
scilab/modules/signal_processing/help/en_US/mrfit.xml
scilab/modules/signal_processing/help/en_US/percentasn.xml
scilab/modules/signal_processing/help/en_US/percentk.xml
scilab/modules/signal_processing/help/en_US/percentsn.xml
scilab/modules/signal_processing/help/en_US/phc.xml
scilab/modules/signal_processing/help/en_US/pspect.xml
scilab/modules/signal_processing/help/en_US/remez.xml
scilab/modules/signal_processing/help/en_US/remezb.xml
scilab/modules/signal_processing/help/en_US/rpem.xml
scilab/modules/signal_processing/help/en_US/sincd.xml
scilab/modules/signal_processing/help/en_US/srfaur.xml
scilab/modules/signal_processing/help/en_US/syredi.xml
scilab/modules/signal_processing/help/en_US/system.xml
scilab/modules/signal_processing/help/en_US/trans.xml
scilab/modules/signal_processing/help/en_US/window.xml
scilab/modules/signal_processing/help/en_US/yulewalk.xml
scilab/modules/signal_processing/help/en_US/zpch1.xml
scilab/modules/signal_processing/help/en_US/zpch2.xml

index 8c546a6..0817017 100644 (file)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 //Evaluate magnitude response of continuous-time system 
 hs=analpf(4,'cheb1',[.1 0],5)
 fr=0:.1:15;
 hf=freq(hs(2),hs(3),%i*fr);
 hm=abs(hf);
 plot(fr,hm)
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>Authors</title>
index 34f24b2..2fac820 100644 (file)
 
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-    Hlp=iir(3,'lp','ellip',[0.1 0],[.08 .03]);
-    pl=roots(Hlp.den);
-    zr=roots(Hlp.num);
-    gn=coeff(Hlp.num,degree(Hlp.num))/coeff(Hlp.den,degree(Hlp.den));
-    z=poly(0,'z');
-    a=0.3;
-    num=z-a;
-    den=1-a*z;
-    [npl,nzr,ngn] = bilt(pl,zr,gn,num,den)
+    <programlisting role="example"><![CDATA[ 
+Hlp=iir(3,'lp','ellip',[0.1 0],[.08 .03]);
+pl=roots(Hlp.den);
+zr=roots(Hlp.num);
+gn=coeff(Hlp.num,degree(Hlp.num))/coeff(Hlp.den,degree(Hlp.den));
+z=poly(0,'z');
+a=0.3;
+num=z-a;
+den=1-a*z;
+[npl,nzr,ngn] = bilt(pl,zr,gn,num,den)
 
-    Hlpt=ngn*poly(nzr,'z','r')/poly(npl,'z','r')
-    //comparison with horner
-    horner(Hlp,num/den)
-  ]]></programlisting>
+Hlpt=ngn*poly(nzr,'z','r')/poly(npl,'z','r')
+
+//comparison with horner
+horner(Hlp,num/den)
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>Authors</title>
index b86630b..5cfccea 100644 (file)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 //squared magnitude response of Butterworth filter
 h=buttmag(13,300,1:1000);
 mag=20*log(h)'/log(10);
 plot2d((1:1000)',mag,[2],"011"," ",[0,-180,1000,20])
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>Authors</title>
index 70015ef..c572e96 100644 (file)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 x=[1,2,3;4,5,6;7,8,9;10,11,12]
 cels=casc(x,'z')
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
 </refentry>
index 6aad433..8ae4c6d 100644 (file)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 w=0.1:0.1:5;mag=1+abs(sin(w));
 fresp=cepstrum(w,mag);
 plot2d([w',w'],[mag(:),abs(fresp)])
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index d198cd5..53a6aa7 100644 (file)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 //Chebyshev; ripple in the passband
 n=13;epsilon=0.2;omegac=3;sample=0:0.05:10;
 h=cheb1mag(n,omegac,epsilon,sample);
 plot2d(sample,h)
 xtitle('','frequencies','magnitude')
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index 7c21ed5..e8055b0 100644 (file)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <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')
+
 //Plotting of frequency edges
 minval=(-maxi(-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(sample',attenuation*ones(sample)',[5],"000")
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index a720442..7f386b5 100644 (file)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 chepol(4,'x')
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>Authors</title>
index 87c754b..ed13ba6 100644 (file)
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">
-
+    <programlisting role="example"><![CDATA[ 
 x=1:3;
 h1=[1,0,0,0,0];h2=[0,1,0,0,0];h3=[0,0,1,0,0];
 x1=convol(h1,x),x2=convol(h2,x),x3=convol(h3,x),
@@ -148,8 +147,7 @@ convol(h1+h2+h3,x)
 p1=poly(x,'x','coeff')
 p2=poly(h1+h2+h3,'x','coeff')
 p1*p2
-  </programlisting>
+ ]]></programlisting>
   </refsection>
 
   <refsection>
index e36d045..76a5f0b 100644 (file)
     <para>
     Computes
   </para>
-    <programlisting><![CDATA[
-
-                n - m 
-                 ====
-                 \                                                 1
-        cov(m) =  >        (x(k)  - xmean) (y(m+k)      - ymean) * ---
-                 /                                                  n
-                 ====
-                 k = 1
-   
-    ]]></programlisting>
+    <programlisting role = ""><![CDATA[ 
+         n - m 
+         ====
+         \                                       1
+cov(m) =  >   (x(k) - xmean) (y(m+k) - ymean) * ---
+         /                                       n
+         ====
+         k = 1
+ ]]></programlisting>
     <para>
     for   m=0,..,<literal>nlag-1</literal> and two vectors <literal>x=[x(1),..,x(n)]</literal>
      <literal>y=[y(1),..,y(n)]</literal>
       <varlistentry>
         <term>Updating method</term>
         <listitem>
-          <programlisting><![CDATA[
-
-    [w,xu]=corr('updt',x1,[y1],w0)
-    [w,xu]=corr('updt',x2,[y2],w,xu)
-     ...
-    wk=corr('updt',xk,[yk],w,xu)
-    
-        ]]></programlisting>
+          <programlisting role = ""><![CDATA[ 
+[w,xu]=corr('updt',x1,[y1],w0)
+[w,xu]=corr('updt',x2,[y2],w,xu)
+ ...
+wk=corr('updt',xk,[yk],w,xu)
+ ]]></programlisting>
           <para>
     With this calling sequence the calculation is updated at each
     call to <literal>corr</literal>.</para>
-          <programlisting><![CDATA[
-
-    w0 = 0*ones(1,2*nlags);
-    nlags = power of 2.
-    
-        ]]></programlisting>
+          <programlisting role = ""><![CDATA[ 
+w0 = 0*ones(1,2*nlags);
+nlags = power of 2.
+ ]]></programlisting>
           <para><literal>x1,x2,...</literal> are parts of <literal>x</literal> such that
     <literal>x=[x1,x2,...]</literal> and sizes of <literal>xi</literal> a power of
     2.  To get <literal>nlags</literal> coefficients a final fft must be
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 x=%pi/10:%pi/10:102.4*%pi;
 rand('seed');rand('normal');
 y=[.8*sin(x)+.8*sin(2*x)+rand(x);.8*sin(x)+.8*sin(1.99*x)+rand(x)];
@@ -191,7 +184,7 @@ for j=1:2,for k=1:2,c=[c;corr(y(k,:),y(j,:),64)];end;end;
 c=matrix(c,2,128);cov=[];
 for j=1:64,cov=[cov;c(:,(j-1)*2+1:2*j)];end;
 rand('unif')
-//
+
 rand('normal');x=rand(1,256);y=-x;
 deff('[z]=xx(inc,is)','z=x(is:is+inc-1)');
 deff('[z]=yy(inc,is)','z=y(is:is+inc-1)');
@@ -214,6 +207,7 @@ norm(c5-c1,1)
 zz=real(fft(w2,1))/256;c6=zz(1:32);
 norm(c6-c2,1)
 rand('unif')
+
 // test for Fortran or C external 
 //
 deff('[y]=xmacro(sec,ist)','y=sin(ist:(ist+sec-1))');
@@ -229,9 +223,7 @@ y=ymacro(100,1);
 [cc,mm]=corr('fft',xmacro,ymacro,100,2^3);
 [cc2,mm2]=corr('fft','corexx','corexy',100,2^3);
 [maxi(abs(cc-cc1)),maxi(abs(mm-mm1)),maxi(abs(cc-cc2)),maxi(abs(mm-mm2))]
-
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index 6ec5da5..1cfee0d 100644 (file)
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">
-
+    <programlisting role="example"><![CDATA[ 
 rand('normal');rand('seed',0);
 x=rand(1:1024-33+1);
 //make low-pass filter with eqfir
@@ -274,8 +273,7 @@ hf=fft(h1,-1);   xf=fft(x1,-1);yf=hf.*xf;y=real(fft(yf,1));
 sm=cspect(100,200,'tr',y);
 smsize=maxi(size(sm));fr=(1:smsize)/smsize;
 plot(fr,log(sm))
-  </programlisting>
+ ]]></programlisting>
   </refsection>
 
   <refsection>
index b87294c..119e552 100644 (file)
@@ -68,8 +68,7 @@
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 a=.7*exp(%i*%pi/6);
 [ffr,bds]=xgetech(); //preserve current context
 rect=[-1.2,-1.2*sqrt(2),1.2,1.2*sqrt(2)];
@@ -88,8 +87,7 @@ w0=w0/(.93*.93);w=exp(-(0:9)*log(w0));z=a*w;
 zr=real(z);zi=imag(z);
 plot2d(zr',zi',[5],"000")
 xsetech(ffr,bds); //restore context
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>Authors</title>
index 8cbcb1b..999ea73 100644 (file)
@@ -70,7 +70,7 @@ y = detrend(x,flag,bp)</synopsis>
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
+    <programlisting role="example"><![CDATA[ 
 // example #1
 t = linspace(0,16*%pi,1000)';
 x = -20 + t + 0.3*sin(0.5*t) + sin(t) + 2*sin(2*t) + 0.5*sin(3*t); 
@@ -88,7 +88,7 @@ xbasc()
 plot2d(t,[x y],style=[2 5])
 legend(["before detrend","after detrend"]);
 xgrid()
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>Authors</title>
index 5ac6096..dba7afd 100644 (file)
@@ -41,8 +41,7 @@
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 n=8;omega = exp(-2*%pi*%i/n);
 j=0:n-1;F=omega.^(j'*j);  //Fourier matrix
 x=1:8;x=x(:);
@@ -52,8 +51,7 @@ dft(x,-1)
 inv(F)*x
 fft(x,1)
 dft(x,1)
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index 3d41644..c135891 100644 (file)
@@ -49,8 +49,7 @@
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 deff('[alpha,BeTa]=alpha_beta(n,m,m1)',...
 'if 2*int(n/2)==n then, BeTa=K1; else, BeTa=0;end;...
 alpha=%k(1-m1)/%k(1-m);')
@@ -64,8 +63,7 @@ sample=0:0.01:20;
 //Now we map the positive real axis into the contour...
 z=alpha*%asn(sample/omegac,m)+Beta*ones(sample);
 plot(sample,ell1mag(epsilon,m1,z))
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index 15c845b..493e8f7 100644 (file)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 hn=eqfir(33,[0 .2;.25 .35;.4 .5],[0 1 0],[1 1 1]);
 [hm,fr]=frmag(hn,256);
 plot(fr,hm),
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>Authors</title>
index 07fe665..2dff88d 100644 (file)
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">
+    <programlisting role="example"><![CDATA[ 
 [cells,fact,zzeros,zpoles]=eqiir('lp','ellip',[2*%pi/10,4*%pi/10],0.02,0.001)
 h=fact*poly(zzeros,'z')/poly(zpoles,'z')
-  </programlisting>
+ ]]></programlisting>
   </refsection>
 
   <refsection>
index 84b31c0..3135f57 100644 (file)
     filter model.
     The algorithm tries to compute the solution P as the growing limit of a
     sequence of matrices Pn such that</para>
-    <programlisting><![CDATA[
-
+    <programlisting role = ""><![CDATA[ 
                                      -1
 Pn+1=F*Pn*F'+(G-F*Pn*h')*(R0-H*Pn*H')  *(G'-H*Pn*F')
        -1
 P0=G*R0 *G'
-   
-    ]]></programlisting>
+ ]]></programlisting>
     <para>
     Note that this method may not converge,especially when F has poles
     near the unit circle. Use preferably the srfaur function.</para>
index 3abccca..f2da952 100644 (file)
@@ -121,8 +121,13 @@ x=fft(a,1,dim,incr)</synopsis>
         <literal>j1</literal> lies in <literal>1:dim(1),</literal> <literal>j2</literal> in
         <literal>1:dim(2),...</literal> one gets a p-variate FFT by calling p times
         <literal>fft</literal> as follows</para>
-          <programlisting><![CDATA[incrk=1; x=a; for k=1:p x=fft(x ,-1,dim(k),incrk)
-        incrk=incrk*dim(k) end]]></programlisting>
+          <programlisting role  = ""><![CDATA[ 
+incrk=1; x=a;
+for k=1:p 
+  x=fft(x ,-1,dim(k),incrk)
+  incrk=incrk*dim(k) 
+end
+ ]]></programlisting>
           <para>where <literal>dimk</literal> is the dimension of the current variable
         w.r.t which one is integrating and <literal>incrk</literal> is the increment
         which separates two successive <literal>jk</literal> elements in
@@ -137,31 +142,29 @@ x=fft(a,1,dim,incr)</synopsis>
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
-  //Comparison with explicit formula
-  //----------------------------------
-  a=[1;2;3];n=size(a,'*');
-  norm(1/n*exp(2*%i*%pi*(0:n-1)'.*.(0:n-1)/n)*a -fft(a,1))
-  norm(exp(-2*%i*%pi*(0:n-1)'.*.(0:n-1)/n)*a -fft(a,-1)) 
+    <programlisting role="example"><![CDATA[ 
+//Comparison with explicit formula
+//----------------------------------
+a=[1;2;3];n=size(a,'*');
+norm(1/n*exp(2*%i*%pi*(0:n-1)'.*.(0:n-1)/n)*a -fft(a,1))
+norm(exp(-2*%i*%pi*(0:n-1)'.*.(0:n-1)/n)*a -fft(a,-1)) 
  
-  //Frequency components of a signal
-  //----------------------------------
-  // build a noides signal sampled at 1000hz  containing to pure frequencies 
-  // at 50 and 70 Hz
-  sample_rate=1000;
-  t = 0:1/sample_rate:0.6;
-  N=size(t,'*'); //number of samples
-  s=sin(2*%pi*50*t)+sin(2*%pi*70*t+%pi/4)+grand(1,N,'nor',0,1);
+//Frequency components of a signal
+//----------------------------------
+// build a noides signal sampled at 1000hz  containing to pure frequencies 
+// at 50 and 70 Hz
+sample_rate=1000;
+t = 0:1/sample_rate:0.6;
+N=size(t,'*'); //number of samples
+s=sin(2*%pi*50*t)+sin(2*%pi*70*t+%pi/4)+grand(1,N,'nor',0,1);
   
-  y=fft(s);
-  //the fft response is symetric we retain only the first N/2 points
-  f=sample_rate*(0:(N/2))/N; //associated frequency vector
-  n=size(f,'*')
-  clf()
-  plot2d(f,abs(y(1:n)))
-  ]]></programlisting>
+y=fft(s);
+//the fft response is symetric we retain only the first N/2 points
+f=sample_rate*(0:(N/2))/N; //associated frequency vector
+n=size(f,'*')
+clf()
+plot2d(f,abs(y(1:n)))
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index 3bcb915..7e6b782 100644 (file)
@@ -44,8 +44,9 @@ y=fft2(x,n,m)</synopsis>
   </refsection>
   <refsection>
     <title>Description</title>
-    <programlisting><![CDATA[This functions performs the two-dimension discrete Fourier
-    transform.]]></programlisting>
+    <programlisting role = ""><![CDATA[ 
+This functions performs the two-dimension discrete Fourier transform.
+ ]]></programlisting>
     <para><literal>y=fft2(x)</literal>y and x have the same size</para>
     <para><literal>y=fft2(x,m,n):</literal> If <literal>m</literal> (respectively
     <literal>n</literal>) is less than the rows number (respectively columns) of
@@ -64,25 +65,24 @@ y=fft2(x,n,m)</synopsis>
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
+    <programlisting role="example"><![CDATA[ 
 //Comparison with explicit formula
 a=[1 2 3 ;4 5 6 ;7 8 9 ;10 11 12]  
 m=size(a,1)
 n=size(a,2)
+
 // fourier transform along the rows
 for i=1:n
 a1(:,i)=exp(-2*%i*%pi*(0:m-1)'.*.(0:m-1)/m)*a(:,i) 
 end
+
 // fourier transform along the columns
 for j=1:m
 a2temp=exp(-2*%i*%pi*(0:n-1)'.*.(0:n-1)/n)*(a1(j,:)).' 
 a2(j,:)=a2temp.'
 end
 norm(a2-fft2(a))
-
-
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index 2ed413a..781804e 100644 (file)
     <para>
     If <literal>x</literal> is an <literal>m</literal> by <literal>n</literal>  matrix <literal>y</literal> is the matrix
     <literal>x([m/2+1:n,1:m/2],[n/2+1:n,1:n/2])</literal>.</para>
-    <programlisting><![CDATA[
-
+    <programlisting role = ""><![CDATA[ 
   [x11 x12]                  [x22 x21]
 x=[       ]        gives   y=[       ]
   [x21 x22]                  [x12 x11]
-   
-    ]]></programlisting>
+ ]]></programlisting>
     <para><literal>y= fftshift(x,n)</literal>  make the swap only along the <literal>n</literal>th dimension</para>
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 //make a signal
 t=0:0.1:1000;
 x=3*sin(t)+8*sin(3*t)+0.5*sin(5*t)+3*rand(t);
 //compute the fft
 y=fft(x,-1);
+
 //display 
 xbasc();
 subplot(2,1,1);plot2d(abs(y))
@@ -73,14 +71,13 @@ x=3*sin(t')*cos(2*t)+8*sin(3*t')*sin(5*t)+..
   0.5*sin(5*t')*sin(5*t)+3*rand(t')*rand(t);
 //compute the fft
 y=fft(x,-1);
+
 //display 
 xbasc();
 xset('colormap',hotcolormap(256))
 subplot(2,1,1);Matplot(abs(y))
 subplot(2,1,2);Matplot(fftshift(abs(y)))
-
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index 627cd39..477f383 100644 (file)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 plot(filt_sinc(100,0.1))
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index c01cc1e..8372b9a 100644 (file)
     </para>
   </refsection>
   <refsection>
-    <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
-    ]]></programlisting>
-  </refsection>
-  <refsection>
     <title>References</title>
     <para>
       Oppenheim, A. V. and R.W. Schafer. Discrete-Time Signal Processing, Englewood Cliffs, NJ: Prentice-Hall, 1989, pp. 311-312. 
index 15e4279..2a41474 100644 (file)
@@ -59,16 +59,14 @@ sys=frfit(w,fresp,order,weight)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 w=0.01:0.01:2;s=poly(0,'s');
 G=syslin('c',2*(s^2+0.1*s+2), (s^2+s+1)*(s^2+0.3*s+1));
 fresp=repfreq(G,w);
 Gid=frfit(w,fresp,4);
 frespfit=repfreq(Gid,w);
 bode(w,[fresp;frespfit])
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index 8870f5c..56ce9c6 100644 (file)
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">
-      hz=iir(3,'bp','cheb1',[.15 .25],[.08 .03]);
-      [hzm,fr]=frmag(hz,256);
-      plot(fr,hzm)
-      hz=iir(3,'bp','ellip',[.15 .25],[.08 .03]);
-      [hzm,fr]=frmag(hz,256);
-      plot(fr,hzm,'r')
-  </programlisting>
+    <programlisting role="example"><![CDATA[ 
+hz=iir(3,'bp','cheb1',[.15 .25],[.08 .03]);
+[hzm,fr]=frmag(hz,256);
+plot(fr,hzm)
+hz=iir(3,'bp','ellip',[.15 .25],[.08 .03]);
+[hzm,fr]=frmag(hz,256);
+plot(fr,hzm,'r')
+ ]]></programlisting>
   </refsection>
 
   <refsection>
index beb9d7d..0a0940f 100644 (file)
@@ -42,8 +42,7 @@
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 //
 //Example of how to use the fsfirlin macro for the design 
 //of an FIR filter by a frequency sampling technique.
@@ -60,6 +59,7 @@ hst2=fsfirlin(hd,1);//corresponding filter
 pas=1/prod(size(hst1))*.5;
 fg=0:pas:.5;//normalized frequencies grid
 plot2d([1 1].*.fg(1:257)',[hst1' hst2']);
+
 // 2nd example
 hd=[0*ones(1,15) ones(1,10) 0*ones(1,39)];//desired samples
 hst1=fsfirlin(hd,1);//filter with no sample in the transition
@@ -70,8 +70,7 @@ fg=0:pas:.5;//normalized frequencies grid
 n=prod(size(hst1))
 plot(fg(1:n),hst1);
 plot2d(fg(1:n)',hst2',[3],"000");
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index 13c9dc6..cd9ef32 100644 (file)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 z=poly(0,'z');
 h=z/(z-.5);
 [tg,fr]=group(100,h);
 plot(fr,tg)
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>Authors</title>
index 5b3c287..3d211d9 100644 (file)
@@ -48,8 +48,7 @@
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 //Example of how to use the hank macro for 
 //building a Hankel matrix from multidimensional 
 //data (covariance or Markov parameters e.g.)
 //being the transposition in scilab)
 //
 //we take here d=2 and n=64
-//
+
 c=rand(2,2*64)
-//
+
 //generate the hankel matrix H (with 4 bloc-rows and 5 bloc-columns)
 //from the data in c
-//
+
 H=hank(4,5,c);
-//
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index 76bb0c3..aac5793 100644 (file)
     </simplelist>
   </refsection>
   <refsection><title>Examples</title>
-  <programlisting role="example"><![CDATA[
-
-   plot(hilb(51))
-  ]]></programlisting></refsection>
+  <programlisting role="example"><![CDATA[ 
+plot(hilb(51))
+ ]]></programlisting></refsection>
   <refsection>
 <title>Authors</title>
   <para>C. B.  </para></refsection>
index d4819d4..a440b5d 100644 (file)
     </simplelist>
   </refsection>
   <refsection><title>Examples</title>
-  <programlisting role="example"><![CDATA[
-
-
-
-  //compare the discrete-time analytic signal imaginary part of the impulse real signal 
-  // with the FIR approximation of the Hilbert transform filter
-  m=25;
-  n=2*m+1;
-  y=hilbert(eye(n,1));
-  h=hilb(n)';
-  h=[h((m+1):$);h(1:m)];
-  plot([imag(y) h])
-  ]]></programlisting></refsection>
+  <programlisting role="example"><![CDATA[ 
+//compare the discrete-time analytic signal imaginary part of the impulse real signal 
+// with the FIR approximation of the Hilbert transform filter
+m=25;
+n=2*m+1;
+y=hilbert(eye(n,1));
+h=hilb(n)';
+h=[h((m+1):$);h(1:m)];
+plot([imag(y) h])
+ ]]></programlisting></refsection>
   <refsection>
 <title>Authors</title>
   <para>C. B.  </para></refsection>
index 57409db..53012fe 100644 (file)
 
     <para>And then, the filter can be represented in bode plot.</para>
 
-    <programlisting> 
+    <programlisting role = ""><![CDATA[  
 // analog elliptic (Bessel), order 2, cutoff 1 Hz
-Epsilon = 3;  // ripple of filter in pass band (0&lt;epsilon&lt;1)
-A       = 60; // attenuation of filter in stop band (A&gt;1)
+Epsilon = 3;  // ripple of filter in pass band (0<epsilon<1)
+A       = 60; // attenuation of filter in stop band (A<1)
 OmegaC  = 10; // pass band cut-off frequency in Hertz
 OmegaR  = 50; // stop band cut-off frequency in Hertz
 
@@ -51,7 +51,7 @@ elatf = syslin('c',num,den);
 // Plot the resulting filter
 bode(elatf,0.01,100);
 title('Analog Elliptic filter');
- </programlisting>
+ ]]></programlisting>
 
     <para>Bode plot is only suited for analog filters.</para>
 
@@ -122,7 +122,7 @@ title('Analog Elliptic filter');
     <para>For our demonstration, we will use the <link
     linkend="iir">iir</link> function.</para>
 
-    <programlisting role="example"> 
+    <programlisting role="example"><![CDATA[ 
 Order   = 2; // The order of the filter
 Fs      = 1000; // The sampling frequency
 Fcutoff = 40;   // The cutoff frequency
@@ -141,7 +141,7 @@ xtitle('Obtained Frequency Response (Magnitude)');
 subplot(2,1,2);
 plot2d(Fs*frq,phi_repf);
 xtitle('Obtained Frequency Response (Phase in degree)');
- </programlisting>
+ ]]></programlisting>
 
     <para>Here is the representation of the digital elliptic filter.</para>
 
@@ -166,7 +166,7 @@ xtitle('Obtained Frequency Response (Phase in degree)');
 
     <para>In the following examples, we will filter a gaussian noise.</para>
 
-    <programlisting>
+    <programlisting role = ""><![CDATA[ 
 rand('normal');
 Input = rand(1,1000); // Produce a random gaussian noise
 t     = 1:1000;
@@ -180,7 +180,7 @@ xtitle('The gaussian noise','t','y');
 subplot(2,1,2);
 plot(t,y);
 xtitle('The filtered gaussian noise','t','y');
- </programlisting>
+ ]]></programlisting>
 
     <para>Here is the representation of the signal before and after
     filtering.</para>
@@ -217,7 +217,7 @@ xtitle('The filtered gaussian noise','t','y');
     <para>First, we try using the <link linkend="dscr">dscr</link> + <link
     linkend="flts">flts</link> functions.</para>
 
-    <programlisting> 
+    <programlisting role = ""><![CDATA[ 
 rand('normal');
 Input = rand(1,1000); // Produce a random gaussian noise
 n     = 1:1000; // The sample index
@@ -231,7 +231,7 @@ xtitle('The gaussian noise','n','y');
 subplot(2,1,2);
 plot(n,y);
 xtitle('The filtered gaussian noise','n','y');
- </programlisting>
+ ]]></programlisting>
 
     <para>Here is the representation of the signal before and after filtering
     using the <link linkend="dscr">dscr</link> + <link
@@ -245,7 +245,7 @@ xtitle('The filtered gaussian noise','n','y');
 
     <para>Next, we use the <link linkend="csim">csim</link> function.</para>
 
-    <programlisting> 
+    <programlisting role = ""><![CDATA[ 
 rand('normal');
 Input = rand(1,1000); // Produce a random gaussian noise
 t     = 1:1000;
@@ -259,7 +259,7 @@ xtitle('The gaussian noise','t','y');
 subplot(2,1,2);
 plot(t,y);
 xtitle('The filtered gaussian noise','t','y');
- </programlisting>
+ ]]></programlisting>
 
     <para>Here is the representation of the signal before and after filtering
     using the <link linkend="csim">csim</link> approach.</para>
index a2f80d1..1cca3fc 100644 (file)
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">
-
+    <programlisting role="example"><![CDATA[ 
 hz=iir(3,'bp','ellip',[.15 .25],[.08 .03]);
 [hzm,fr]=frmag(hz,256);
 plot2d(fr',hzm')
 xtitle('Discrete IIR filter band pass  0.15&lt;fr&lt;0.25 ',' ',' ');
 q=poly(0,'q');     //to express the result in terms of the delay operator q=z^-1
 hzd=horner(hz,1/q) 
-  </programlisting>
+ ]]></programlisting>
   </refsection>
 
   <refsection>
index 0d71b56..f6e816c 100644 (file)
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">
-
+    <programlisting role="example"><![CDATA[ 
 //We use the 'levin' macro for solving the normal equations 
 //on two examples: a one-dimensional and a two-dimensional process.
 //We need the covariance sequence of the stochastic process.
 //We generate the process defined by two sinusoids (1Hz and 2 Hz) 
 //in additive Gaussian noise (this is the observed process); 
 //the simulated process is sampled at 10 Hz (step 0.1 in t, underafter).
-//
+
 t1=0:.1:100;rand('normal');
 y1=sin(2*%pi*t1)+sin(2*%pi*2*t1);y1=y1+rand(y1);plot(t1,y1);
-//
+
 //covariance of y1
-//
+
 nlag=128;
 c1=corr(y1,nlag);
 c1=c1';//c1 needs to be given columnwise (see the section PARAMETERS of this help)
-//
+
 //compute the filter for a maximum order of n=10
 //la is a list-type variable each element of which 
 //containing the filters of order ranging from 1 to n; (try varying n)
 //in the d-dimensional case this is a matrix polynomial (square, d X d)
 //sig gives, the same way, the mean-square error
-//
+
 n=15;
 [la1,sig1]=levin(n,c1);
-//
+
 //verify that the roots of 'la' contain the 
 //frequency spectrum of the observed process y
 //(remember that y is sampled -in our example 
@@ -214,15 +213,15 @@ n=15;
 //the original frequencies (1Hz and 2 Hz) through 
 //the log and correct scaling by the frequency sampling)
 //we verify this for each filter order
-//
+
 for i=1:n, s1=roots(la1(i));s1=log(s1)/2/%pi/.1;
-//
+
 //now we get the estimated poles (sorted, positive ones only !)
-//
+
 s1=sort(imag(s1));s1=s1(1:i/2);end;
-//
+
 //the last two frequencies are the ones really present in the observed 
-//process ---&gt; the others are "artifacts" coming from the used model size.
+//process ---> the others are "artifacts" coming from the used model size.
 //This is related to the rather difficult problem of order estimation.
 //
 //2) A 2-dimensional process 
@@ -231,8 +230,7 @@ s1=sort(imag(s1));s1=s1(1:i/2);end;
 //   |y_1|        y_1=sin(2*Pi*t)+sin(2*Pi*2*t)+Gaussian noise
 // y=|   | with : 
 //   |y_2|        y_2=sin(2*Pi*3*t)+sin(2*Pi*4*t)+Gaussian noise
-//
-//
+
 d=2;dt=0.1;
 nlag=64;
 t2=0:2*%pi*dt:100;
@@ -242,24 +240,22 @@ for j=1:2, for k=1:2, c2=[c2;corr(y2(k,:),y2(j,:),nlag)];end;end;
 c2=matrix(c2,2,128);cov=[];
 for j=1:64,cov=[cov;c2(:,(j-1)*d+1:j*d)];end;//covar. columnwise
 c2=cov;
-//
+
 //in the multidimensional case, we have to compute the 
 //roots of the determinant of the matrix polynomial 
-//(easy in the 2-dimensional case but tricky if d&gt;=3 !). 
+//(easy in the 2-dimensional case but tricky if d>=3 !). 
 //We just do that here for the maximum desired 
 //filter order (n); mp is the matrix polynomial of degree n
-//
+
 [la2,sig2]=levin(n,c2);
 mp=la2(n);determinant=mp(1,1)*mp(2,2)-mp(1,2)*mp(2,1);
 s2=roots(determinant);s2=log(s2)/2/%pi/0.1;//same trick as above for 1D process
 s2=sort(imag(s2));s2=s2(1:d*n/2);//just the positive ones !
-//
+
 //There the order estimation problem is seen to be much more difficult !
 //many artifacts ! The 4 frequencies are in the estimated spectrum 
 //but beneath many non relevant others.
-//
-  </programlisting>
+ ]]></programlisting>
   </refsection>
 
   <refsection>
index a379e11..ed527e8 100644 (file)
     along its first dimension, two points along its second
     dimension and three points along its third dimension the row
     vector is arranged as follows</para>
-    <programlisting><![CDATA[
-
-     x=[x(1,1,1),x(2,1,1),x(3,1,1),
-        x(1,2,1),x(2,2,1),x(3,2,1),
-              x(1,1,2),x(2,1,2),x(3,1,2),
-              x(1,2,2),x(2,2,2),x(3,2,2),
-                    x(1,1,3),x(2,1,3),x(3,1,3),
-                    x(1,2,3),x(2,2,3),x(3,2,3)]
-   
-    ]]></programlisting>
+    <programlisting role = ""><![CDATA[ 
+x=[x(1,1,1),x(2,1,1),x(3,1,1),
+   x(1,2,1),x(2,2,1),x(3,2,1),
+   x(1,1,2),x(2,1,2),x(3,1,2),
+   x(1,2,2),x(2,2,2),x(3,2,2),
+   x(1,1,3),x(2,1,3),x(3,1,3),
+   x(1,2,3),x(2,2,3),x(3,2,3)]
+ ]]></programlisting>
     <para>
     and the <literal>dim</literal> vector is: <literal>dim=[3,2,3]</literal></para>
   </refsection>
index cd3fcbd..0a74a30 100644 (file)
@@ -60,8 +60,7 @@ sys=mrfit(w,mag,order,weight)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 w=0.01:0.01:2;s=poly(0,'s');
 G=syslin('c',2*(s^2+0.1*s+2),(s^2+s+1)*(s^2+0.3*s+1)); // syslin('c',Num,Den);
 fresp=repfreq(G,w);
@@ -69,8 +68,7 @@ mag=abs(fresp);
 Gid=mrfit(w,mag,4);
 frespfit=repfreq(Gid,w);
 plot2d([w',w'],[mag(:),abs(frespfit(:))])
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index dab43c8..8ff190c 100644 (file)
@@ -43,8 +43,7 @@
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 m=0.8;z=%asn(1/sqrt(m),m);K=real(z);Ktilde=imag(z);
 x2max=1/sqrt(m);
 x1=0:0.05:1;x2=1:((x2max-1)/20):x2max;x3=x2max:0.05:10;
@@ -52,11 +51,10 @@ x=[x1,x2,x3];
 y=%asn(x,m);
 rect=[0,-Ktilde,1.1*K,2*Ktilde];
 plot2d(real(y)',imag(y)',1,'011',' ',rect)
-//
+
 deff('y=f(t)','y=1/sqrt((1-t^2)*(1-m*t^2))');
 intg(0,0.9,f)-%asn(0.9,m)  //Works for real case only!
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>Authors</title>
index b25bb1e..d7b885f 100644 (file)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 m=0.4;
 %asn(1,m)
 %k(m)
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index 2ca3f37..471fa63 100644 (file)
@@ -45,8 +45,7 @@
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 m=0.36;
 K=%k(m);
 P=4*K; //Real period
@@ -60,8 +59,7 @@ ima_val2=(KK+0.05):(Ip/25):(Ip+KK);
 z1=%sn(%i*ima_val1,m);z2=%sn(%i*ima_val2,m);
 plot2d([ima_val1',ima_val2'],[imag(z1)',imag(z2)']);
 xgrid(3)
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index 49d0966..1db0ae7 100644 (file)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
-//
+    <programlisting role="example"><![CDATA[ 
 //This example may usefully be compared with the results from 
 //the 'levin' macro (see the corresponding help and example)
 //
 //We consider the process defined by two sinusoids (1Hz and 2 Hz) 
 //in additive Gaussian noise (this is the observation); 
 //the simulated process is sampled at 10 Hz.
-//
+
 t=0:.1:100;rand('normal');
 y=sin(2*%pi*t)+sin(2*%pi*2*t);y=y+rand(y);plot(t,y)
-//
+
 //covariance of y
-//
+
 nlag=128;
 c=corr(y,nlag);
-//
+
 //hankel matrix from the covariance sequence
 //(we can choose to take more information from covariance
 //by taking greater n and m; try it to compare the results !
-//
+
 n=20;m=20;
 h=hank(n,m,c);
-//
+
 //compute the Markov representation (mh,mf,mg)
 //We just take here a state dimension equal to 4 :
 //this is the rather difficult problem of estimating the order !
 //Try varying ns ! 
 //(the observation dimension is here equal to one)
+
 ns=4;
 [mh,mf,mg]=phc(h,1,ns);
-//
+
 //verify that the spectrum of mf contains the 
 //frequency spectrum of the observed process y
 //(remember that y is sampled -in our example 
 //at 10Hz (T=0.1s) so that we need 
 //to retrieve the original frequencies through the log 
 //and correct scaling by the frequency sampling)
-//
+
 s=spec(mf);s=log(s);
 s=s/2/%pi/.1;
-//
+
 //now we get the estimated spectrum
 imag(s),
-//
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index 2ab8bca..c23bf10 100644 (file)
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">
-
-      rand('normal');rand('seed',0);
-      x=rand(1:1024-33+1);
-      //make low-pass filter with eqfir
-      nf=33;bedge=[0 .1;.125 .5];des=[1 0];wate=[1 1];
-      h=eqfir(nf,bedge,des,wate);
-      //filter white data to obtain colored data 
-      h1=[h 0*ones(1:maxi(size(x))-1)];
-      x1=[x 0*ones(1:maxi(size(h))-1)];
-      hf=fft(h1,-1); xf=fft(x1,-1);y=real(fft(hf.*xf,1));
-
-      //plot magnitude of filter
-      h2=[h 0*ones(1:968)];hf2=fft(h2,-1);hf2=real(hf2.*conj(hf2));
-      hsize=maxi(size(hf2));fr=(1:hsize)/hsize;plot(fr,log(hf2));
-      //pspect example
-      sm=pspect(100,200,'tr',y);smsize=maxi(size(sm));fr=(1:smsize)/smsize;
-      plot(fr,log(sm));
-      rand('unif');
-      
-    </programlisting>
+    <programlisting role="example"><![CDATA[ 
+rand('normal');rand('seed',0);
+x=rand(1:1024-33+1);
+
+//make low-pass filter with eqfir
+nf=33;bedge=[0 .1;.125 .5];des=[1 0];wate=[1 1];
+h=eqfir(nf,bedge,des,wate);
+
+//filter white data to obtain colored data 
+h1=[h 0*ones(1:maxi(size(x))-1)];
+x1=[x 0*ones(1:maxi(size(h))-1)];
+hf=fft(h1,-1); xf=fft(x1,-1);y=real(fft(hf.*xf,1));
+
+//plot magnitude of filter
+h2=[h 0*ones(1:968)];hf2=fft(h2,-1);hf2=real(hf2.*conj(hf2));
+hsize=maxi(size(hf2));fr=(1:hsize)/hsize;plot(fr,log(hf2));
+
+//pspect example
+sm=pspect(100,200,'tr',y);smsize=maxi(size(sm));fr=(1:smsize)/smsize;
+plot(fr,log(sm));
+rand('unif');
+ ]]></programlisting>
   </refsection>
 
   <refsection>
index 2414caa..9eabc9f 100644 (file)
     <para>Minimax approximation of a frequency domain magnitude response. The
     approximation takes the form</para>
 
-    <programlisting> h = sum[a(i)*cos(weight)], i=1:n</programlisting>
+    <programlisting role = ""><![CDATA[ 
+h = sum[a(i)*cos(weight)], i=1:n
+ ]]></programlisting>
 
     <para>An FIR, linear-phase filter can be obtained from the the output of
     <literal>remez</literal> by using the following commands:</para>
 
-    <programlisting>  hn(1:nc-1)=an(nc:-1:2)/2;
-  hn(nc)=an(1);
-  hn(nc+1:2*nc-1)=an(2:nc)/2;   </programlisting>
+    <programlisting role = ""><![CDATA[ 
+hn(1:nc-1)=an(nc:-1:2)/2;
+hn(nc)=an(1);
+hn(nc+1:2*nc-1)=an(2:nc)/2;
+ ]]></programlisting>
 
     <para>This function is mainly intended to be called by the <link
     linkend="remezb">remezb function</link>.</para>
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">      nc=21;
-      ngrid=nc*250;
-      fgrid=.5*(0:(ngrid-1))/(ngrid-1);
-      mag(1:ngrid/2)=ones(1:ngrid/2);
-      mag(ngrid/2+1:ngrid)=0*ones(1:ngrid/2);
-      weight=ones(fgrid);
-      guess=round(1:ngrid/nc:ngrid);
-      guess(nc+1)=ngrid;
-      guess(nc+2)=ngrid;
-      an=remez(guess,mag,fgrid,weight);</programlisting>
+    <programlisting role="example"><![CDATA[ 
+nc=21;
+ngrid=nc*250;
+fgrid=.5*(0:(ngrid-1))/(ngrid-1);
+mag(1:ngrid/2)=ones(1:ngrid/2);
+mag(ngrid/2+1:ngrid)=0*ones(1:ngrid/2);
+weight=ones(fgrid);
+guess=round(1:ngrid/nc:ngrid);
+guess(nc+1)=ngrid;
+guess(nc+2)=ngrid;
+an=remez(guess,mag,fgrid,weight);
+ ]]></programlisting>
   </refsection>
 
   <refsection>
       <member><link linkend="eqfir">eqfir</link></member>
     </simplelist>
   </refsection>
-</refentry>
\ No newline at end of file
+</refentry>
index 6d39d59..1a05467 100644 (file)
     for n=0,1,...,nc. An FIR, linear-phase filter
     can be obtained from the the output of the function
     by using the following commands</para>
-    <programlisting><![CDATA[
-
-         hn(1:nc-1)=an(nc:-1:2)/2;
-         hn(nc)=an(1);
-         hn(nc+1:2*nc-1)=an(2:nc)/2;
-   
-    ]]></programlisting>
+    <programlisting role = ""><![CDATA[ 
+hn(1:nc-1)=an(nc:-1:2)/2;
+hn(nc)=an(1);
+hn(nc+1:2*nc-1)=an(2:nc)/2;
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 // Choose the number of cosine functions and create a dense grid 
 // in [0,.24) and [.26,.5)
 nc=21;ngrid=nc*16;
 fg=.24*(0:ngrid/2-1)/(ngrid/2-1);
 fg(ngrid/2+1:ngrid)=fg(1:ngrid/2)+.26*ones(1:ngrid/2);
+
 // Specify a low pass filter magnitude for the desired response
 ds(1:ngrid/2)=ones(1:ngrid/2);
 ds(ngrid/2+1:ngrid)=zeros(1:ngrid/2);
+
 // Specify a uniform weighting function
 wt=ones(fg);
+
 // Run remezb
 an=remezb(nc,fg,ds,wt)
+
 // Make a linear phase FIR filter 
 hn(1:nc-1)=an(nc:-1:2)/2;
 hn(nc)=an(1);
 hn(nc+1:2*nc-1)=an(2:nc)/2;
+
 // Plot the filter's magnitude response
 plot(.5*(0:255)/256,frmag(hn,256));
-//////////////
+
 // Choose the number of cosine functions and create a dense grid in [0,.5)
 nc=21; ngrid=nc*16;
 fg=.5*(0:(ngrid-1))/ngrid;
+
 // Specify a triangular shaped magnitude for the desired response
 ds(1:ngrid/2)=(0:ngrid/2-1)/(ngrid/2-1);
 ds(ngrid/2+1:ngrid)=ds(ngrid/2:-1:1);
+
 // Specify a uniform weighting function
 wt=ones(fg);
+
 // Run remezb
 an=remezb(nc,fg,ds,wt)
+
 // Make a linear phase FIR filter 
 hn(1:nc-1)=an(nc:-1:2)/2;
 hn(nc)=an(1);
 hn(nc+1:2*nc-1)=an(2:nc)/2;
+
 // Plot the filter's magnitude response
 plot(.5*(0:255)/256,frmag(hn,256));
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index fa579d3..f26cc69 100644 (file)
           <para>
            Applicable values for the first call:
          </para>
-          <programlisting><![CDATA[
-
+          <programlisting role = ""><![CDATA[ 
 theta=phi=psi=l=0*ones(1,3*n). p=eye(3*n,3*n)
-   
-          ]]></programlisting>
+ ]]></programlisting>
         </listitem>
       </varlistentry>
       <varlistentry>
@@ -83,11 +81,9 @@ theta=phi=psi=l=0*ones(1,3*n). p=eye(3*n,3*n)
         <listitem>
           <para>optional argument (forgetting constant) choosed close to 1 as convergence occur:</para>
           <para><literal>lambda=[lambda0,alfa,beta]</literal> evolves according to :</para>
-          <programlisting><![CDATA[
-
+          <programlisting role = ""><![CDATA[ 
 lambda(t)=alfa*lambda(t-1)+beta 
-   
-        ]]></programlisting>
+ ]]></programlisting>
           <para>
            with <literal>lambda(0)=lambda0</literal></para>
        </listitem>
@@ -97,11 +93,9 @@ lambda(t)=alfa*lambda(t-1)+beta
        <listitem>
          <para>contraction factor to be chosen close to 1 as convergence occurs.</para>
           <para><literal>k=[k0,mu,nu]</literal> evolves according to:</para>
-          <programlisting><![CDATA[
-
+          <programlisting role = ""><![CDATA[ 
 k(t)=mu*k(t-1)+nu 
-   
-        ]]></programlisting>
+ ]]></programlisting>
           <para>
            with <literal>k(0)=k0</literal>.</para>
        </listitem>
@@ -144,12 +138,10 @@ k(t)=mu*k(t-1)+nu
     Uses Ljung-Soderstrom recursive prediction error method.
     Model considered is the following:
   </para>
-    <programlisting><![CDATA[
-
+    <programlisting role = ""><![CDATA[ 
 y(t)+a(1)*y(t-1)+...+a(n)*y(t-n)=
 b(1)*u(t-1)+...+b(n)*u(t-n)+e(t)+c(1)*e(t-1)+...+c(n)*e(t-n)
-   
-    ]]></programlisting>
+ ]]></programlisting>
     <para>
   </para>
     <para>
index 5521eb5..7c29493 100644 (file)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 plot(sincd(10,1)) 
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>Authors</title>
index a325f45..a93f922 100644 (file)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 //GENERATE SIGNAL
 x=%pi/10:%pi/10:102.4*%pi;
 rand('seed',0);rand('normal');
 y=[1;1]*sin(x)+[sin(2*x);sin(1.9*x)]+rand(2,1024);
+
 //COMPUTE CORRELATIONS
 c=[];for j=1:2,for k=1:2,c=[c;corr(y(k,:),y(j,:),64)];end;end
 c=matrix(c,2,128);
+
 //FINDING H,F,G with 6 states
 hk=hank(20,20,c);
 [H,F,G]=phc(hk,2,6);
+
 //SOLVING RICCATI EQN
 r0=c(1:2,1:2);
 [P,s,t,l,Rt,Tt]=srfaur(H,F,G,r0,200);
+
 //Make covariance matrix exactly symetric
 Rt=(Rt+Rt')/2
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index fec7b6e..3ddb608 100644 (file)
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">
-      [fact,b2,b1,b0,c1,c0,zzeros,zpoles]=syredi(1,4,[2*%pi/10,4*%pi/10,0,0],0.02,0.001);
-      h=fact*(b0+b1*%z+b2*%z^2)./(c0+c1*%z+%z^2)
-  </programlisting>
+    <programlisting role="example"><![CDATA[ 
+[fact,b2,b1,b0,c1,c0,zzeros,zpoles]=syredi(1,4,[2*%pi/10,4*%pi/10,0,0],0.02,0.001);
+h=fact*(b0+b1*%z+b2*%z^2)./(c0+c1*%z+%z^2)
+ ]]></programlisting>
   </refsection>
 
   <refsection>
       <member><link linkend="eqiir">eqiir</link></member>
     </simplelist>
   </refsection>
-</refentry>
\ No newline at end of file
+</refentry>
index a5f5a78..d95c80f 100644 (file)
     define system function which generates the next
     observation given the old state.
     System recursively calculated</para>
-    <programlisting><![CDATA[
-
-     x1=f*x0+g*u
-     y=h*x0+v
-   
-    ]]></programlisting>
+    <programlisting role = ""><![CDATA[ 
+x1=f*x0+g*u
+y=h*x0+v
+ ]]></programlisting>
     <para>
     where <literal>u</literal> is distributed <literal>N(0,q)</literal>
     and <literal>v</literal> is distribute <literal>N(0,r)</literal>.</para>
index aab91f7..bc9f0a1 100644 (file)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 clf()
 Hlp=iir(3,'lp','ellip',[0.1 0],[.08 .03]);
 Hbp=trans(Hlp,'bp',[0.01 0.1]);
@@ -114,7 +113,7 @@ Hsb=trans(Hlp,'sb',[0.01 0.1])
 clf();gainplot([Hlp;Hbp;Hsb],1d-3,0.48);
 l=legend(['original low pass';'band pass';'stop band']);
 l.legend_location="in_lower_left";
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>Authors</title>
index 51a0653..de4dac7 100644 (file)
@@ -113,8 +113,7 @@ win_l=window('kr',n,alpha)
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 // Hamming window
 clf()
 N=64;
@@ -147,8 +146,7 @@ subplot(122)
 n=256;[W,fr]=frmag(w,n);
 plot2d(fr,20*log10(W),style=color('blue'))
 set(gca(),'grid',[1 1]*color('gray'))
-   
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>See Also</title>
index b58a566..9dfe281 100644 (file)
     <title>Description</title>
     <para>
     Hz = yulewalk(N,frq,mag) finds the N-th order iir filter</para>
-    <programlisting><![CDATA[
-
+    <programlisting role = ""><![CDATA[ 
                   n-1         n-2            
       B(z)   b(1)z     + b(2)z    + .... + b(n)
 H(z)= ---- = ---------------------------------
                 n-1       n-2
       A(z)    z   + a(2)z    + .... + a(n)
-   
-    ]]></programlisting>
+ ]]></programlisting>
     <para>
     which matches the magnitude frequency response given by vectors frq and mag.
     Vectors frq and mag specify the frequency and magnitude of the desired
@@ -62,8 +60,7 @@ H(z)= ---- = ---------------------------------
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[
-
+    <programlisting role="example"><![CDATA[ 
 f=[0,0.4,0.4,0.6,0.6,1];H=[0,0,1,1,0,0];Hz=yulewalk(8,f,H);
 fs=1000;fhz = f*fs/2;  
 xbasc(0);xset('window',0);plot2d(fhz',H');
@@ -71,7 +68,6 @@ xtitle('Desired Frequency Response (Magnitude)')
 [frq,repf]=repfreq(Hz,0:0.001:0.5);
 xbasc(1);xset('window',1);plot2d(fs*frq',abs(repf'));
 xtitle('Obtained Frequency Response (Magnitude)')
-  ]]></programlisting>
+ ]]></programlisting>
   </refsection>
 </refentry>
index df0ac11..b25cb3e 100644 (file)
     <title>Description</title>
     <para>
     Poles of a Type 1 Chebyshev analog filter. The transfer function is given by :</para>
-    <programlisting><![CDATA[
-
- H(s)=gain/poly(poles,'s')
-   
-    ]]></programlisting>
+    <programlisting role = ""><![CDATA[ 
+H(s)=gain/poly(poles,'s')
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>Authors</title>
index abc0bd5..92bf06d 100644 (file)
     <para>
     Poles and zeros of a type 2 Chebyshev analog filter
     gain is the gain of the filter</para>
-    <programlisting><![CDATA[
-
+    <programlisting role = ""><![CDATA[ 
 H(s)=gain*poly(zeros,'s')/poly(poles,'s')
-   
-    ]]></programlisting>
+ ]]></programlisting>
   </refsection>
   <refsection>
     <title>Authors</title>