# doc-cache created by Octave 9.2.0
# name: cache
# type: cell
# rows: 3
# columns: 55
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
Contents


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3226
 LTFAT - Basic Fourier and DCT analysis.

  Peter L. Soendergaard, 2008 - 2023.

  Support routines
    FFTINDEX       -  Index of positive and negative frequencies.
    MODCENT        -  Centered modulo operation.
    FLOOR23        -  Previous number with only 2,3 factors
    FLOOR235       -  Previous number with only 2,3,5 factors
    CEIL23         -  Next number with only 2,3 factors
    CEIL235        -  Next number with only 2,3,5 factors
    NEXTFASTFFT    -  Next efficient FFT size (2,3,5,7).
  
  Basic Fourier analysis
    DFT            -  Unitary discrete Fourier transform.
    IDFT           -  Inverse of DFT.
    FFTREAL        -  FFT for real valued signals.
    IFFTREAL       -  Inverse of FFTREAL.
    GGA            -  Generalized Goertzel Algorithm.
    CHIRPZT        -  Chirped Z-transform.
    FFTGRAM	    -  Plot energy of FFT.
    PLOTFFT        -  Plot FFT coefficients.
    PLOTFFTREAL    -  Plot FFTREAL coefficients.

  Simple operations on periodic functions
    INVOLUTE       -  Involution.
    PEVEN          -  Even part of periodic function.
    PODD           -  Odd part of periodic function.
    PCONV          -  Periodic convolution.
    PXCORR         -  Periodic crosscorrelation.
    LCONV          -  Linear convolution.
    LXCORR	    -  Linear crosscorrelation. 
    ISEVENFUNCTION -  Test if function is even.
    MIDDLEPAD      -  Cut or extend even function.

  Periodic functions
    EXPWAVE        -  Complex exponential wave.
    PCHIRP         -  Periodic chirp.
    PGAUSS         -  Periodic Gaussian.
    PSECH          -  Periodic SECH.
    PBSPLINE       -  Periodic B-splines.
    SHAH           -  Shah distribution.
    PHEAVISIDE     -  Periodic Heaviside function.
    PRECT          -  Periodic rectangle function.
    PSINC          -  Periodic sinc function.
    PTPFUN         -  Periodic totally positive function of finite type.
    PEBFUN         -  Periodic EB spline. 

  Specialized dual windows
    PTPFUNDUAL     -  Dual window for PTPFUN
    PEBFUNDUAL     -  Dual window for PEBFUN

  Hermite functions and fractional Fourier transforms
    PHERM          -  Periodic Hermite functions.
    HERMBASIS      -  Orthonormal basis of Hermite functions.    
    DFRACFT        -  Discrete Fractional Fourier transform
    FFRACFT        -  Fast Fractional Fourier transform

  Approximation of continuous functions
    FFTRESAMPLE    -  Fourier interpolation.
    DCTRESAMPLE    -  Cosine interpolation.
    PDERIV         -  Derivative of periodic function.
    FFTANALYTIC    -  Analytic representation of a function.

  Cosine and Sine transforms.
    DCTI           -  Discrete cosine transform type I
    DCTII          -  Discrete cosine transform type II
    DCTIII         -  Discrete cosine transform type III
    DCTIV          -  Discrete cosine transform type IV
    DSTI           -  Discrete sine transform type I
    DSTII          -  Discrete sine transform type II
    DSTIII         -  Discrete sine transform type III
    DSTIV          -  Discrete sine transform type IV

  For help, bug reports, suggestions etc. please visit 
  http://github.com/ltfat/ltfat/issues

   Url: http://ltfat.github.io/doc/fourier/Contents.html



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
 LTFAT - Basic Fourier and DCT analysis.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
ceil23


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 919
 -- Function: ceil23
     CEIL23  Next number with only 2,3 factors
        Usage: nceil=ceil23(n);
     
        CEIL23(n) returns the next number greater than or equal to n,
        which can be written as a product of powers of 2 and 3.
     
        The algorithm will look up the best size in a table, which is computed
        the first time the function is run. If the input size is larger than the
        largest value in the table, the input size will be reduced by factors of
        2, until it is in range.
     
        [nceil,table]=CEIL23(n) additionally returns the table used for lookup.
     
        Examples:
        ---------
     
        Return the first number larger or equal to 19 that can be written
        solely as products of powers of 2 and 3*:
      
          ceil23(19)
     
     *Url*: <http://ltfat.github.io/doc/fourier/ceil23.html>

     See also: floor23, ceil235, nextfastfft.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
CEIL23  Next number with only 2,3 factors
   Usage: nceil=ceil23(n);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
ceil235


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 939
 -- Function: ceil235
     CEIL235  Next number with only 2,3 and 5 factors
        Usage: nceil=ceil235(n);
     
        CEIL235(n)  returns the next number greater than or equal to n,
        which can be written as a product of powers of 2, 3 and 5.
     
        The algorithm will look up the best size in a table, which is computed
        the first time the function is run. If the input size is larger than the
        largest value in the table, the input size will be reduced by factors of
        2, until it is in range.
     
        [nceil,table]=CEIL235(n) additionally returns the table used for lookup.
     
        Examples:
        ---------
     
        Return the first number larger or equal to 19 that can be written
        solely as products of powers of 2, 3 and 5*:
      
          ceil235(19)
     
     *Url*: <http://ltfat.github.io/doc/fourier/ceil235.html>

     See also: floor235, ceil23, nextfastfft.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 76
CEIL235  Next number with only 2,3 and 5 factors
   Usage: nceil=ceil235(n);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
chirpzt


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3020
 -- Function: chirpzt
     CHIRPZT Chirped Z-transform
        Usage:  c = chirpzt(f,K,fdiff)
                c = chirpzt(f,K,fdiff,foff)
                c = chirpzt(f,K,fdiff,foff,fs)
     
        Input parameters:
              f      : Input data.
              K      : Number of values.
              fdiff  : Frequency increment.
              foff   : Starting frequency. 
              fs     : Sampling frequency. 
     
        Output parameters:
              c      : Coefficient vector.
     
        c = CHIRPZT(f,K,fdiff,foff) computes K samples of the discrete-time 
        fourier transform DTFT c of f at values c(k+1)=F(2pi(f_{off}+kf_{diff}))
        for k=0,dots,K-1 where F=DTFT(f). Values foff and fdiff should
        be in range of 0-1. If foff is ommited or empty, it is considered to
        be 0. If fdiff is ommited or empty, K equidistant values 
        c(k+1)=F(2pi k/K) are computed. If even K is ommited or empty, 
        input length is used instead resulting in the same values as fft does.
     
        c = CHIRPZT(f,K,fdiff,foff,fs) computes coefficients using frequency 
        values relative to fs c(k+1)=F(2pi(f_{off}+kf_{diff})/fs) for k=0,dots,K-1.
     
        The input f is processed along the first non-singleton dimension or
        along dimension dim if specified.
     
        Examples:
        ---------
        
        Calculating DTFT samples of interest (aka zoom FFT):
      
          % Generate input signal
          fs = 8000;
          L = 2^10;
          k = (0:L-1).';
          f1 = 400;
          f2 = 825;
          f = 5*sin(2*pi*k*f1/fs + pi/4) + 2*sin(2*pi*k*f2/fs - pi/3);
     
          % This is equal to fft(f)
          ck = chirpzt(f,L);
     
          %chirpzt to FFT error:
          norm(ck-fft(f))
     
          % Frequency "resolution" in Hz
          fdiff = 0.4;
          % Frequency offset in Hz
          foff = 803.9;
          % Number of frequency values
          K = 125;
          % DTFT samples. The frequency range of interest is 803.9-853.5 Hz
          ckchzt = chirpzt(f,K,fdiff,foff,fs);
     
          % Plot modulus of coefficients
          figure(1);
          fax=foff+fdiff.*(0:K-1);
          hold on;
          stem(k/L*fs,abs(ck),'k');
          stem(fax,abs(ckchzt),'r:');
          set(gca,'XLim',[foff,foff+K*fdiff]);
          set(gca,'YLim',[0 1065]);
          xlabel('f[Hz]');
          ylabel('|ck|');
     
          % Plot phase of coefficients
          figure(2);
          hold on;
          stem(k/L*fs,angle(ck),'k');
          stem(fax,angle(ckchzt),'r:');
          set(gca,'XLim',[foff,foff+K*fdiff]);
          set(gca,'YLim',[-pi pi]);
          xlabel('f[Hz]');
          ylabel('angle(ck)');
     
     
        References:
          L. Rabiner, R. Schafer, and C. Rader. The chirp Z-transform algorithm.
          Audio and Electroacoustics, IEEE Transactions on, 17(2):86--92, 1969.
          
     *Url*: <http://ltfat.github.io/doc/fourier/chirpzt.html>

     See also: gga.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
CHIRPZT Chirped Z-transform
   Usage:  c = chirpzt(f,K,fdiff)
           c = ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
dcti


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2238
 -- Function: dcti
     DCTI  Discrete Cosine Transform type I
        Usage:  c=dcti(f);
                c=dcti(f,L);
                c=dcti(f,[],dim);
                c=dcti(f,L,dim);
     
        DCTI(f) computes the discrete cosine transform of type I of the
        input signal f. If f is a matrix then the transformation is applied to
        each column. For N-D arrays, the transformation is applied to the first
        non-singleton dimension.
     
        DCTI(f,L) zero-pads or truncates f to length L before doing the
        transformation.
     
        DCTI(f,[],dim) or DCTI(f,L,dim) applies the transformation along
        dimension dim.
     
        The transform is real (output is real if input is real) and
        it is orthonormal.
     
        This transform is its own inverse.
     
        Let f be a signal of length L, let c=dcti(f) and define the vector
        w of length L by
     
           w = [1/sqrt(2) 1 1 1 1 ...1/sqrt(2)]
     
        Then
     
                                   L-1
          c(n+1) = sqrt(2/(L-1)) * sum w(n+1)*w(m+1)*f(m+1)*cos(pi*n*m/(L-1))
                                   m=0
     
        The implementation of this functions uses a simple algorithm that require
        an FFT of length 2L-2, which might potentially be the product of a large
        prime number. This may cause the function to sometimes execute slowly.
        If guaranteed high speed is a concern, please consider using one of the
        other DCT transforms.
     
        Examples:
        ---------
     
        The following figures show the first 4 basis functions of the DCTI of
        length 20:
     
          % The dcti is its own adjoint.
          F=dcti(eye(20));
     
          for ii=1:4
            subplot(4,1,ii);
            stem(F(:,ii));
          end;
     
     
        References:
          K. Rao and P. Yip. Discrete Cosine Transform, Algorithms, Advantages,
          Applications. Academic Press, 1990.
          
          M. V. Wickerhauser. Adapted wavelet analysis from theory to software.
          Wellesley-Cambridge Press, Wellesley, MA, 1994.
          
     *Url*: <http://ltfat.github.io/doc/fourier/dcti.html>

     See also: dctii, dctiv, dsti.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
DCTI  Discrete Cosine Transform type I
   Usage:  c=dcti(f);
           c=dct...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
dctii


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1803
 -- Function: dctii
     DCTII  Discrete Consine Transform type II
        Usage:  c=dctii(f);
                c=dctii(f,L);
                c=dctii(f,[],dim);
                c=dctii(f,L,dim);
     
        DCTII(f) computes the discrete cosine transform of type II of the
        input signal f. If f is multi-dimensional, the transformation is
        applied along the first non-singleton dimension.
     
        DCTII(f,L) zero-pads or truncates f to length L before doing the
        transformation.
     
        DCTII(f,[],dim) or DCTII(f,L,dim) applies the transformation along
        dimension dim.
     
        The transform is real (output is real if input is real) and orthonormal.
     
        This is the inverse of DCTIII.
     
        Let f be a signal of length L, let c=DCTII(f) and define the
        vector w of length L by
     
           w = [1/sqrt(2) 1 1 1 1 ...]
     
        Then 
     
                               L-1
          c(n+1) = sqrt(2/L) * sum w(n+1)*f(m+1)*cos(pi*n*(m+.5)/L) 
                               m=0 
     
        Examples:
        ---------
     
        The following figures show the first 4 basis functions of the DCTII of
        length 20:
     
          % The dctiii is the adjoint of dctii.
          F=dctiii(eye(20));
     
          for ii=1:4
            subplot(4,1,ii);
            stem(F(:,ii));
          end;
     
     
        References:
          K. Rao and P. Yip. Discrete Cosine Transform, Algorithms, Advantages,
          Applications. Academic Press, 1990.
          
          M. V. Wickerhauser. Adapted wavelet analysis from theory to software.
          Wellesley-Cambridge Press, Wellesley, MA, 1994.
          
     *Url*: <http://ltfat.github.io/doc/fourier/dctii.html>

     See also: dctiii, dctiv, dstii.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
DCTII  Discrete Consine Transform type II
   Usage:  c=dctii(f);
           c...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
dctiii


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1818
 -- Function: dctiii
     DCTIII  Discrete Consine Transform type III
        Usage:  c=dctiii(f);
                c=dctiii(f,L);
                c=dctiii(f,[],dim);
                c=dctiii(f,L,dim);
     
        DCTIII(f) computes the discrete cosine transform of type III of the
        input signal f. If f is multi-dimensional, the transformation is
        applied along the first non-singleton dimension.
     
        DCTIII(f,L) zero-pads or truncates f to length L before doing the
        transformation.
     
        DCTIII(f,[],dim) or DCTIII(f,L,dim) applies the transformation along
        dimension dim.
     
        The transform is real (output is real if input is real) and orthonormal.
     
        This is the inverse of DCTII.
     
        Let f be a signal of length L, let c=DCTIII(f) and define the vector
        w of length L by  
     
            w = [1/sqrt(2) 1 1 1 1 ...]
     
        Then 
     
                               L-1
          c(n+1) = sqrt(2/L) * sum w(m+1)*f(m+1)*cos(pi*(n+.5)*m/L) 
                               m=0 
     
        Examples:
        ---------
     
        The following figures show the first 4 basis functions of the DCTIII of
        length 20:
     
          % The dctii is the adjoint of dctiii.
          F=dctii(eye(20));
     
          for ii=1:4
            subplot(4,1,ii);
            stem(F(:,ii));
          end;
     
     
        References:
          K. Rao and P. Yip. Discrete Cosine Transform, Algorithms, Advantages,
          Applications. Academic Press, 1990.
          
          M. V. Wickerhauser. Adapted wavelet analysis from theory to software.
          Wellesley-Cambridge Press, Wellesley, MA, 1994.
          
     *Url*: <http://ltfat.github.io/doc/fourier/dctiii.html>

     See also: dctii, dctiv, dstii.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
DCTIII  Discrete Consine Transform type III
   Usage:  c=dctiii(f);
         ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
dctiv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1579
 -- Function: dctiv
     DCTIV  Discrete Consine Transform type IV
        Usage:  c=dctiv(f);
     
        DCTIV(f) computes the discrete cosine transform of type IV of the
        input signal f. If f is multi-dimensional, the transformation is
        applied along the first non-singleton dimension.
     
        DCTIV(f,L) zero-pads or truncates f to length L before doing the
        transformation.
     
        DCTIV(f,[],dim) or DCTIV(f,L,dim) applies the transformation along
        dimension dim.
     
        The transform is real (output is real if input is real) and
        orthonormal.  It is its own inverse.
     
        Let f be a signal of length L and let c=DCTIV(f). Then
     
                               L-1
          c(n+1) = sqrt(2/L) * sum f(m+1)*cos(pi*(n+.5)*(m+.5)/L) 
                               m=0 
     
        Examples:
        ---------
     
        The following figures show the first 4 basis functions of the DCTIV of
        length 20:
     
          % The dctiv is its own adjoint.
          F=dctiv(eye(20));
     
          for ii=1:4
            subplot(4,1,ii);
            stem(F(:,ii));
          end;
     
     
        References:
          K. Rao and P. Yip. Discrete Cosine Transform, Algorithms, Advantages,
          Applications. Academic Press, 1990.
          
          M. V. Wickerhauser. Adapted wavelet analysis from theory to software.
          Wellesley-Cambridge Press, Wellesley, MA, 1994.
          
     *Url*: <http://ltfat.github.io/doc/fourier/dctiv.html>

     See also: dctii, dctiii, dstii.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
DCTIV  Discrete Consine Transform type IV
   Usage:  c=dctiv(f);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
dctresample


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 821
 -- Function: dctresample
     DCTRESAMPLE   Resample signal using Fourier interpolation
        Usage:  h=dctresample(f,L);
                h=dctresample(f,L,dim);
     
        DCTRESAMPLE(f,L) returns a discrete cosine interpolation of the signal f*
        to length L. If the function is applied to a matrix, it will apply
        to each column.
     
        DCTRESAMPLE(f,L,dim) does the same along dimension dim.
     
        If the input signal is not a periodic signal (or close to), this method
        will give much better results than FFTRESAMPLE at the endpoints, as
        this method assumes than the signal is even a the endpoints.
     
        The algorithm uses a DCT type iii.
     
     *Url*: <http://ltfat.github.io/doc/fourier/dctresample.html>

     See also: fftresample, middlepad, dctiii.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
DCTRESAMPLE   Resample signal using Fourier interpolation
   Usage:  h=dctres...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
dfracft


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1103
 -- Function: dfracft
     DFRACFT  Discrete Fractional Fourier transform
        Usage:  V=dfracft(f,a,p);
                V=dfracft(f,a);
     
        DFRACFT(f,a) computes the discrete fractional Fourier Transform of the
        signal f to the power a. For a=1 it corresponds to the ordinary
        discrete Fourier Transform. If f is multi-dimensional, the
        transformation is applied along the first non-singleton dimension.
     
        DFRACFT(f,a,dim) does the same along dimension dim.   
     
        DFRACFT(f,a,[],p) or DFRACFT(f,a,dim,p) allows to choose the order
        of approximation of the second difference operator (default: p=2*).
     
     
        References:
          A. Bultheel and S. Martinez. Computation of the Fractional Fourier
          Transform. Appl. Comput. Harmon. Anal., 16(3):182--202, 2004.
          
          H. M. Ozaktas, Z. Zalevsky, and M. A. Kutay. The Fractional Fourier
          Transform. John Wiley and Sons, 2001.
          
     *Url*: <http://ltfat.github.io/doc/fourier/dfracft.html>

     See also: ffracft, dft, hermbasis, pherm.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
DFRACFT  Discrete Fractional Fourier transform
   Usage:  V=dfracft(f,a,p);
 ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
dft


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 715
 -- Function: dft
     DFT   Normalized Discrete Fourier Transform
        Usage: f=dft(f);
               f=dft(f,N,dim);
     
        DFT computes a normalized or unitary discrete Fourier transform. The 
        unitary discrete Fourier transform is computed by
        
                               L-1
          c(k+1) = 1/sqrt(L) * sum f(l+1)*exp(-2*pi*i*k*l/L)
                               l=0
     
        for k=0,...,L-1.
     
        The output of DFT is a scaled version of the output from fft. The
        function takes exactly the same arguments as fft. See the help on fft
        for a thorough description.
     
     *Url*: <http://ltfat.github.io/doc/fourier/dft.html>

     See also: idft.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
DFT   Normalized Discrete Fourier Transform
   Usage: f=dft(f);
          f=d...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
dsti


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2033
 -- Function: dsti
     DSTI  Discrete Sine Transform type I
        Usage:  c=dsti(f);
                c=dsti(f,L);
                c=dsti(f,[],dim);
                c=dsti(f,L,dim);
     
        DSTI(f) computes the discrete sine transform of type I of the
        input signal f. If f is multi-dimensional, the transformation is
        applied along the first non-singleton dimension.
     
        DSTI(f,L) zero-pads or truncates f to length L before doing the
        transformation.
     
        DSTI(f,[],dim) or DSTI(f,L,dim) applies the transformation along
        dimension dim.
     
        The transform is real (output is real if input is real) and orthonormal.
     
        This transform is its own inverse.
     
        Let f be a signal of length L and let c=DSTI(f). Then 
     
                                   L-1
          c(n+1) = sqrt(2/(L+1)) * sum sin(pi*(n+1)*(m+1)/(L+1)) 
                                   m=0 
        The implementation of this functions uses a simple algorithm that requires
        an FFT of length 2N+2, which might potentially be the product of a large
        prime number. This may cause the function to sometimes execute slowly.
        If guaranteed high speed is a concern, please consider using one of the
        other DST transforms.
     
        Examples:
        ---------
     
        The following figures show the first 4 basis functions of the DSTI of
        length 20:
     
          % The dsti is its own adjoint.
          F=dsti(eye(20));
     
          for ii=1:4
            subplot(4,1,ii);
            stem(F(:,ii));
          end;
     
     
        References:
          K. Rao and P. Yip. Discrete Cosine Transform, Algorithms, Advantages,
          Applications. Academic Press, 1990.
          
          M. V. Wickerhauser. Adapted wavelet analysis from theory to software.
          Wellesley-Cambridge Press, Wellesley, MA, 1994.
          
     *Url*: <http://ltfat.github.io/doc/fourier/dsti.html>

     See also: dcti, dstiii, dstiv.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
DSTI  Discrete Sine Transform type I
   Usage:  c=dsti(f);
           c=dsti(...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
dstii


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1809
 -- Function: dstii
     DSTII  Discrete Sine Transform type II
        Usage:  c=dstii(f);
                c=dstii(f,L);
                c=dstii(f,[],dim);
                c=dstii(f,L,dim);
     
        DSTII(f) computes the discrete sine transform of type II of the
        input signal f. If f is multi-dimensional, the transformation is
        applied along the first non-singleton dimension.
     
        DSTII(f,L) zero-pads or truncates f to length L before doing the
        transformation.
     
        DSTII(f,[],dim) or DSTII(f,L,dim) applies the transformation along
        dimension dim.
     
        The transform is real (output is real if input is real) and orthonormal.
     
        The inverse transform of DSTII is DSTIII.
     
        Let f be a signal of length L, let c=DSTII(f) and define the vector
        w of length L by
     
           w = [1 1 1 1 ... 1/sqrt(2)]
     
        Then 
     
                               L-1
          c(n+1) = sqrt(2/L) * sum w(n+1)*f(m+1)*sin(pi*n*(m+.5)/L) 
                               m=0 
     
        Examples:
        ---------
     
        The following figures show the first 4 basis functions of the DSTII of
        length 20:
     
          % The dstiii is the adjoint of dstii.
          F=dstiii(eye(20));
     
          for ii=1:4
            subplot(4,1,ii);
            stem(F(:,ii));
          end;
     
     
        References:
          K. Rao and P. Yip. Discrete Cosine Transform, Algorithms, Advantages,
          Applications. Academic Press, 1990.
          
          M. V. Wickerhauser. Adapted wavelet analysis from theory to software.
          Wellesley-Cambridge Press, Wellesley, MA, 1994.
          
     *Url*: <http://ltfat.github.io/doc/fourier/dstii.html>

     See also: dctii, dstiii, dstiv.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
DSTII  Discrete Sine Transform type II
   Usage:  c=dstii(f);
           c=ds...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
dstiii


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1813
 -- Function: dstiii
     DSTIII  Discrete sine transform type III
        Usage:  c=dstiii(f);
                c=dstiii(f,L);
                c=dstiii(f,[],dim);
                c=dstiii(f,L,dim);
     
        DSTIII(f) computes the discrete sine transform of type III of the
        input signal f. If f is multi-dimensional, the transformation is
        applied along the first non-singleton dimension.
     
        DSTIII(f,L) zero-pads or truncates f to length L before doing the
        transformation.
     
        DSTIII(f,[],dim) or DSTIII(f,L,dim) applies the transformation along
        dimension dim.
     
        The transform is real (output is real if input is real) and orthonormal.
     
        This is the inverse of DSTII.
     
        Let f be a signal of length L, let c=DSTIII(f) and define the vector
        w of length L by  
     
            w = [1 1 1 1 ... 1/sqrt(2)]
     
        Then 
     
                               L-1
          c(n+1) = sqrt(2/L) * sum w(m+1)*f(m+1)*sin(pi*(n+.5)*m/L) 
                               m=0 
     
     
        Examples:
        ---------
     
        The following figures show the first 4 basis functions of the DSTIII of
        length 20:
     
          % The dstii is the adjoint of dstiii.
          F=dstii(eye(20));
     
          for ii=1:4
            subplot(4,1,ii);
            stem(F(:,ii));
          end;
     
        References:
          K. Rao and P. Yip. Discrete Cosine Transform, Algorithms, Advantages,
          Applications. Academic Press, 1990.
          
          M. V. Wickerhauser. Adapted wavelet analysis from theory to software.
          Wellesley-Cambridge Press, Wellesley, MA, 1994.
          
     *Url*: <http://ltfat.github.io/doc/fourier/dstiii.html>

     See also: dctii, dstii, dstiv.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
DSTIII  Discrete sine transform type III
   Usage:  c=dstiii(f);
           c...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
dstiv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1792
 -- Function: dstiv
     DSTIV  Discrete Sine Transform type IV
        Usage:  c=dstiv(f);
                c=dstiv(f,L);
                c=dstiv(f,[],dim);
                c=dstiv(f,L,dim);
     
        DSTIV(f) computes the discrete sine transform of type IV of the input
        signal f. If f is a matrix, then the transformation is applied to
        each column. For N-D arrays, the transformation is applied to the first
        non-singleton dimension.
     
        DSTIV(f,L) zero-pads or truncates f to length L before doing the
        transformation.
     
        DSTIV(f,[],dim) applies the transformation along dimension dim. 
        DSTIV(f,L,dim) does the same, but pads or truncates to length L.
        
        The transform is real (output is real if input is real) and
        it is orthonormal. It is its own inverse.
     
        Let f be a signal of length L and let c=DSTIV(f). Then
     
                               L-1
          c(n+1) = sqrt(2/L) * sum f(m+1)*sin(pi*(n+.5)*(m+.5)/L) 
                               m=0 
     
        Examples:
        ---------
     
        The following figures show the first 4 basis functions of the DSTIV of
        length 20:
     
          % The dstiv is its own adjoint.
          F=dstiv(eye(20));
     
          for ii=1:4
            subplot(4,1,ii);
            stem(F(:,ii));
          end;
     
     
        References:
          K. Rao and P. Yip. Discrete Cosine Transform, Algorithms, Advantages,
          Applications. Academic Press, 1990.
          
          M. V. Wickerhauser. Adapted wavelet analysis from theory to software.
          Wellesley-Cambridge Press, Wellesley, MA, 1994.
          
     *Url*: <http://ltfat.github.io/doc/fourier/dstiv.html>

     See also: dstii, dstiii, dctii.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
DSTIV  Discrete Sine Transform type IV
   Usage:  c=dstiv(f);
           c=ds...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
expwave


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 770
 -- Function: expwave
     EXPWAVE   Complex exponential wave
        Usage:  h=expwave(L,m);
                h=expwave(L,m,cent);
     
        EXPWAVE(L,m) returns an exponential wave revolving m times around the
        origin. The collection of all waves with wave number m=0,...,L-1
        forms the basis of the discrete Fourier transform.
     
        The wave has absolute value 1 everywhere. To get an exponential wave
        with unit l^2-norm, divide the wave by sqrt(L). This is the
        normalization used in the DFT function.
     
        EXPWAVE(L,m,cent) makes it possible to shift the sampling points by
        the amount cent. Default is cent=0.
       
     *Url*: <http://ltfat.github.io/doc/fourier/expwave.html>

     See also: dft, pchirp.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
EXPWAVE   Complex exponential wave
   Usage:  h=expwave(L,m);
           h=ex...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
ffracft


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1546
 -- Function: ffracft
     FFRACFT Approximate fast fractional Fourier transform
        Usage:  frf=ffracft(f,a)
                frf=ffracft(f,a,dim)
     
        FFRACFT(f,a) computes an approximation of the fractional Fourier
        transform of the signal f to the power a. If f is
        multi-dimensional, the transformation is applied along the first
        non-singleton dimension.
     
        FFRACFT(f,a,dim) does the same along dimension dim.   
     
        FFRACFT takes the following flags at the end of the line of input
        arguments:
     
          'origin'    Rotate around the origin of the signal. This is the
                      same action as the DFT, but the signal will split in
                      the middle, which may not be the correct action for
                      data signals. This is the default.
     
          'middle'    Rotate around the middle of the signal. This will not
                      break the signal in the middle, but the DFT cannot be
                      obtained in this way.
     
        Examples:
        ---------
     
        The following example shows a rotation of the LTFATLOGO test
        signal:
     
           sgram(ffracft(ltfatlogo,.3,'middle'),'lin','nf');
     
     
        References:
          A. Bultheel and S. Martinez. Computation of the Fractional Fourier
          Transform. Appl. Comput. Harmon. Anal., 16(3):182--202, 2004.
          
     *Url*: <http://ltfat.github.io/doc/fourier/ffracft.html>

     See also: dfracft, hermbasis, pherm.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
FFRACFT Approximate fast fractional Fourier transform
   Usage:  frf=ffracft(...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
fftanalytic


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1421
 -- Function: fftanalytic
     FFTANALYTIC Compute analytic representation
        Usage:  z = fftanalytic(f);
                z = fftanalytic(f,L);
                z = fftanalytic(f,L,dim);
     
        Input parameters:
              f     : Input data.
              L     : Extend or truncate f to this length.
              dim   : Dimension to along which to apply the computations.
        Output parameters:
              z     : Analytic signal.
     
        FFTANALYTIC(f) computes the analytic representation of a 
        real-valued signal f. The analytic representation is computed 
        through the FFT of f. The computations are done along the first 
        non-singleton dimension. 
     
        FFTANALYTIC(f,L) acts as before but f is padded with zeros or 
        truncated to length L.
     
        FFTANALYTIC(f,L,dim) in addition allows specifying the dimension 
        along which the computation should be done.
     
        The real part of the analytic representation z equals the signal 
        f and the imaginary part is the Hilbert transform of f. 
     
        The instananeous amplitude (a Hilbert envelope) of the signal f can 
        be computed as:
     
          abs(fftanalytic(f));
     
        The instantaneous phase of the function f can be computed as:
     
          angle(fftanalytic(f));
     
     *Url*: <http://ltfat.github.io/doc/fourier/fftanalytic.html>


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
FFTANALYTIC Compute analytic representation
   Usage:  z = fftanalytic(f);
  ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
fftgram


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1080
 -- Function: fftgram
     FFTGRAM Plot the energy of the discrete Fourier transform
        Usage:  fftgram(f)
                fftgram(f, fs)
     
        FFTGRAM(f) plots the energy of the discrete Fourier transform computed 
        from the function f. The function forms a Fourier pair with the periodic
        autocorrelation function.
     
        FFTGRAM(f,fs) does the same for a signal sampled with a sampling
        frequency of fs Hz. If fs is no specified, the plot will display
        normalized frequencies.
     
        FFTGRAM(f,fs,dynrange) additionally specifies the dynamic range to
        display on the figure.
     
        Additional arguments for FFTGRAM:
     
           'db'      Plots the energy on a dB scale. This is the default.
     
           'lin'     Plots the energy on a linear scale.
     
        In addition to these parameters, FFTGRAM accepts any of the flags from
        SETNORM. The input signal will be normalized as specified.
     
     *Url*: <http://ltfat.github.io/doc/fourier/fftgram.html>

     See also: dft, plotfft.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
FFTGRAM Plot the energy of the discrete Fourier transform
   Usage:  fftgram(...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
fftindex


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 504
 -- Function: fftindex
     FFTINDEX  Frequency index of FFT modulations
        Usage: n=fftindex(N);
     
        FFTINDEX(N) returns the index of the frequencies of the standard FFT of
        length N as they are ordered in the output from the fft routine. The
        numbers returned are in the range -ceil(N/2)+1:floor(N/2)
     
        FFTINDEX(N,0) does as above, but sets the Nyquist frequency to zero.
     
     *Url*: <http://ltfat.github.io/doc/fourier/fftindex.html>

     See also: dft.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
FFTINDEX  Frequency index of FFT modulations
   Usage: n=fftindex(N);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
fftreal


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 504
 -- Function: fftreal
     FFTREAL   FFT for real valued input data
        Usage: f=fftreal(f);
               f=fftreal(f,N,dim);
     
        FFTREAL(f) computes the coefficients corresponding to the positive
        frequencies of the FFT of the real valued input signal f.
        
        The function takes exactly the same arguments as fft. See the help on
        fft for a thorough description.
     
     *Url*: <http://ltfat.github.io/doc/fourier/fftreal.html>

     See also: ifftreal, dft.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
FFTREAL   FFT for real valued input data
   Usage: f=fftreal(f);
          f=...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
fftresample


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 678
 -- Function: fftresample
     FFTRESAMPLE   Resample signal using Fourier interpolation
        Usage:  h=fftresample(f,L);
                h=fftresample(f,L,dim);
     
        FFTRESAMPLE(f,L) returns a Fourier interpolation of the signal f*
        to length L. If the function is applied to a matrix, it will apply
        to each column.  
     
        FFTRESAMPLE(f,L,dim) does the same along dimension dim.
     
        If the input signal is *not* a periodic signal (or close to), the
        DCTRESAMPLE method gives much better results at the endpoints.
     
     *Url*: <http://ltfat.github.io/doc/fourier/fftresample.html>

     See also: dctresample, middlepad.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
FFTRESAMPLE   Resample signal using Fourier interpolation
   Usage:  h=fftres...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
floor23


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1154
 -- Function: floor23
     FLOOR23  Previous number with only 2,3 factors
        Usage: nceil=floor23(n);
     
        FLOOR23(n) returns the first number less than or equal to n,
        which can be written as a product of powers of 2 and 3.
     
        The algorithm will look up the best size in a table, which is computed
        the first time the function is run. If the input size is larger than the
        largest value in the table, the input size will be reduced by factors of
        2, until it is in range.
     
        [nceil,table]=FLOOR23(n) additionally returns the table used for lookup.
     
        Examples:
        ---------
     
        Return the first number smaller or equal to 26 that can be written
        solely as products of powers of 2 and 3*:
      
          floor23(26)
     
        This plot shows the behaviour of FLOOR23 and CEIL23 for numbers
        up to 100:
     
          x=1:100;
          plot(x,floor23(x),x,ceil23(x));
          legend('floor23','ceil23','Location','Northwest');
     
     *Url*: <http://ltfat.github.io/doc/fourier/floor23.html>

     See also: ceil23, floor235, nextfastfft.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 74
FLOOR23  Previous number with only 2,3 factors
   Usage: nceil=floor23(n);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
floor235


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1184
 -- Function: floor235
     FLOOR235  Previous number with only 2,3 and 5 factors
        Usage: nfloor=floor235(n);
     
        FLOOR235(n)  returns the next number greater than or equal to n,
        which can be written as a product of powers of 2, 3 and 5.
     
        The algorithm will look up the best size in a table, which is computed
        the first time the function is run. If the input size is larger than the
        largest value in the table, the input size will be reduced by factors of
        2, until it is in range.
     
        [nfloor,table]=FLOOR235(n) additionally returns the table used for lookup.
     
        Examples:
        ---------
     
        Return the first number smaller or equal to 26 that can be written
        solely as products of powers of 2, 3 and 5*:
      
          floor235(26)
     
        This plot shows the behaviour of FLOOR235 and CEIL235 for numbers
        up to 100:
     
          x=1:100;
          plot(x,floor235(x),x,ceil235(x));
          legend('floor235','ceil235','Location','Northwest');
     
     *Url*: <http://ltfat.github.io/doc/fourier/floor235.html>

     See also: floor23, ceil235, nextfastfft.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
FLOOR235  Previous number with only 2,3 and 5 factors
   Usage: nfloor=floor2...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
gga


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3033
 -- Function: gga
     GGA Generalized Goertzel algorithm
        Usage:  c = gga(x,fvec)
                c = gga(x,fvec,fs)
     
        Input parameters:
              x      : Input data.
              fvec   : Indices to calculate. 
              fs     : Sampling frequency.
     
        Output parameters:
              c      : Coefficient vector.
     
        c=GGA(f,fvec) computes the discrete-time fourier transform DTFT of
        f at frequencies in fvec as c(k)=F(2pi f_{vec}(k)) where
        F=DTFT(f), k=1,dots K and K=length(fvec) using the generalized
        second-order Goertzel algorithm. Thanks to the generalization, values
        in fvec can be arbitrary numbers in range 0-1 and not restricted to
        l/Ls, l=0,dots Ls-1 (usual DFT samples) as the original Goertzel 
        algorithm is. Ls is the length of the first non-singleton dimension
        of f. If fvec is empty or ommited, fvec is assumed to be
        (0:Ls-1)/Ls and results in the same output as fft.
     
        c=GGA(f,fvec,fs) computes the same with fvec in Hz relative to fs.
     
        The input f is processed along the first non-singleton dimension or
        along dimension dim if specified.
     
        *Remark:**
        Besides the generalization the algorithm is also shortened by one
        iteration compared to the conventional Goertzel.
     
        Examples:
        ---------
        
        Calculating DTFT samples of interest:
      
          % Generate input signal
          fs = 8000;
          L = 2^10;
          k = (0:L-1).';
          freq = [400,510,620,680,825];
          phase = [pi/4,-pi/4,-pi/8,pi/4,-pi/3];
          amp = [5,3,4,1,2];
          f = arrayfun(@(a,f,p) a*sin(2*pi*k*f/fs+p),...
                       amp,freq,phase,'UniformOutput',0);
          f = sum(cell2mat(f),2);
      
          % This is equal to fft(f)
          ck = gga(f);
      
          %GGA to FFT error:
          norm(ck-fft(f))
      
          % DTFT samples at 400,510,620,680,825 Hz
          ckgga = gga(f,freq,fs);
      
          % Plot modulus of coefficients
          figure(1);clf;hold on;
          stem(k/L*fs,2*abs(ck)/L,'k');
          stem(freq,2*abs(ckgga)/L,'r:');
          set(gca,'XLim',[freq(1)-50,freq(end)+50]);
          set(gca,'YLim',[0 6]);
          xlabel('f[Hz]');
          ylabel('|c(k)|');
          hold off;
      
          % Plot phase of coefficients
          figure(2);clf;hold on;
          stem(k/L*fs,angle(ck),'k');
          stem(freq,angle(ckgga),'r:');
          set(gca,'XLim',[freq(1)-50,freq(end)+50]);
          set(gca,'YLim',[-pi pi]);
          xlabel('f[Hz]');
          ylabel('angle(c(k))');
          hold off;
     
     
        References:
          P. Sysel and P. Rajmic. Goertzel algorithm generalized to non-integer
          multiples of fundamental frequency. EURASIP Journal on Advances in
          Signal Processing, 2012(1):56, 2012.
          
     *Url*: <http://ltfat.github.io/doc/fourier/gga.html>

     See also: chirpzt.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
GGA Generalized Goertzel algorithm
   Usage:  c = gga(x,fvec)
           c = ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
hermbasis


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1862
 -- Function: hermbasis
     HERMBASIS  Orthonormal basis of discrete Hermite functions
        Usage:  V=hermbasis(L,p);
                V=hermbasis(L);
                [V,D]=hermbasis(...);
     
        HERMBASIS(L,p) computes an orthonormal basis of discrete Hermite
        functions of length L. The vectors are returned as columns in the
        output. p is the order of approximation used to construct the
        position and difference operator.
     
        All the vectors in the output are eigenvectors of the discrete Fourier
        transform, and resemble samplings of the continuous Hermite functions
        to some degree (for low orders).
     
        [V,D]=HERMBASIS(...) also returns the eigenvalues D of the Discrete
        Fourier Transform corresponding to the Hermite functions.
     
        Examples:
        ---------
     
        The following plot shows the spectrograms of 4 Hermite functions of
        length 200 with order 1, 10, 100, and 190:
     
          H=hermbasis(200);
        
          subplot(2,2,1);
          sgram(H(:,1),'nf','tc','lin','nocolorbar'); axis('square');
     
          subplot(2,2,2);
          sgram(H(:,10),'nf','tc','lin','nocolorbar'); axis('square');
         
          subplot(2,2,3);
          sgram(H(:,100),'nf','tc','lin','nocolorbar'); axis('square');
         
          subplot(2,2,4);
          sgram(H(:,190),'nf','tc','lin','nocolorbar'); axis('square');
     
     
        References:
          A. Bultheel and S. Martinez. Computation of the Fractional Fourier
          Transform. Appl. Comput. Harmon. Anal., 16(3):182--202, 2004.
          
          H. M. Ozaktas, Z. Zalevsky, and M. A. Kutay. The Fractional Fourier
          Transform. John Wiley and Sons, 2001.
          
     *Url*: <http://ltfat.github.io/doc/fourier/hermbasis.html>

     See also: dft, pherm.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
HERMBASIS  Orthonormal basis of discrete Hermite functions
   Usage:  V=hermb...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
idft


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 738
 -- Function: idft
     IDFT  Inverse normalized Discrete Fourier Transform
        Usage: f=idft(c);
               f=idft(c,N,dim);
     
        IDFT computes a normalized or unitary inverse discrete Fourier transform. 
        The unitary discrete Fourier transform is computed by
        
                               L-1
          f(l+1) = 1/sqrt(L) * sum c(k+1)*exp(2*pi*i*k*l/L)
                               k=0
     
        for l=0,...,L-1.
     
        The output of IDFT is a scaled version of the output from ifft. The
        function takes exactly the same arguments as ifft. See the help on ifft
        for a thorough description.
     
     *Url*: <http://ltfat.github.io/doc/fourier/idft.html>

     See also: dft.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
IDFT  Inverse normalized Discrete Fourier Transform
   Usage: f=idft(c);
    ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
ifftreal


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 545
 -- Function: ifftreal
     IFFTREAL  Inverse FFT for real valued signals
        Usage: f=ifftreal(c,N);
               f=ifftreal(c,N,dim);
     
        IFFTREAL(c,N) computes an inverse FFT of the positive frequency
        Fourier coefficients c. The length N must always be specified,
        because the correct transform length cannot be determined from the
        size of c.
     
        IFFTREAL(c,N,dim) does the same along dimension dim.
     
     *Url*: <http://ltfat.github.io/doc/fourier/ifftreal.html>

     See also: fftreal.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
IFFTREAL  Inverse FFT for real valued signals
   Usage: f=ifftreal(c,N);
    ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
involute


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 931
 -- Function: involute
     INVOLUTE  Involution 
        Usage: finv=involute(f);
               finv=involute(f,dim);
     
        INVOLUTE(f) will return the involution of f.
     
        INVOLUTE(f,dim) will return the involution of f along dimension dim.
        This can for instance be used to calculate the 2D involution:
     
          f=involute(f,1);
          f=involute(f,2);
     
        The involution finv of f is given by:
     
          finv(l+1)=conj(f(mod(-l,L)+1));
     
        for l=0,...,L-1.
     
        The relation between conjugation, Fourier transformation and involution
        is expressed by:
     
          conj(dft(f)) == dft(involute(f))
     
        for all signals f. The inverse discrete Fourier transform can be
        expressed by:
     
          idft(f) == conj(involute(dft(f)));
     
     *Url*: <http://ltfat.github.io/doc/fourier/involute.html>

     See also: dft, pconv.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
INVOLUTE  Involution 
   Usage: finv=involute(f);
          finv=involute(f,d...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
isevenfunction


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 656
 -- Function: isevenfunction
     ISEVENFUNCTION  True if function is even
        Usage:  t=isevenfunction(f);
                t=isevenfunction(f,tol);
     
        ISEVENFUNCTION(f) returns 1 if f is whole point even. Otherwise it
        returns 0.
     
        ISEVENFUNCTION(f,tol) does the same, using the tolerance tol to measure
        how large the error between the two parts of the vector can be. Default
        is 1e-10.
     
        Adding the flag 'hp' as the last argument does the same for half point
        even functions.
       
     *Url*: <http://ltfat.github.io/doc/fourier/isevenfunction.html>

     See also: middlepad, peven.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
ISEVENFUNCTION  True if function is even
   Usage:  t=isevenfunction(f);
    ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
lconv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1304
 -- Function: lconv
     LCONV  Linear convolution
        Usage:  h=lconv(f,g);
     
        LCONV(f,g) computes the linear convolution of f and g. The linear 
        convolution is given by
     
                    Lh-1
           h(l+1) = sum f(k+1) * g(l-k+1)
                    k=0
     
        with L_{h} = L_{f} + L_{g} - 1 where L_{f} and L_{g} are the lengths of f and g, 
        respectively.
     
        LCONV(f,g,'r') computes the linear convolution of f and g where g is reversed.
        This type of convolution is also known as linear cross-correlation and is given by
     
                    Lh-1
           h(l+1) = sum f(k+1) * conj(g(k-l+1))
                    k=0
     
        LCONV(f,g,'rr') computes the alternative where both f and g are
        reversed given by
     
                    Lh-1
           h(l+1) = sum conj(f(-k+1)) * conj(g(k-l+1))
                    k=0
          
        In the above formulas, l-k, k-l and -k are computed modulo L_{h}.
     
        The input arrays f and g can be 1D vectors or one of them can be
        a multidimensional array. In either case, the convolution is performed
        along columns with row vectors transformed to columns.
     
     *Url*: <http://ltfat.github.io/doc/fourier/lconv.html>

     See also: pconv.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
LCONV  Linear convolution
   Usage:  h=lconv(f,g);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
lxcorr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 677
 -- Function: lxcorr
     LXCORR  Linear crosscorrelation
        Usage:  h=lxcorr(f,g)
     
        LXCORR(f) computes the linear crosscorrelation of the input signal f and g. 
        The linear cross-correlation is computed by
     
                    Lh-1
           h(l+1) = sum f(k+1) * conj(g(k-l+1))
                    k=0
     
        with L_{h} = L_{f} + L_{g} - 1 where L_{f} and L_{g} are the lengths of f and g, 
        respectively.
     
        LXCORR(f,'normalize') does the same, but normalizes the output by
        the product of the l^2-norm of f and g.
     
     *Url*: <http://ltfat.github.io/doc/fourier/lxcorr.html>

     See also: pxcorr, lconv.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
LXCORR  Linear crosscorrelation
   Usage:  h=lxcorr(f,g)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
middlepad


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1043
 -- Function: middlepad
     MIDDLEPAD  Symmetrically zero-extends or cuts a function
        Usage:  h=middlepad(f,L);
                h=middlepad(f,L,dim);
                h=middlepad(f,L,...);
     
        MIDDLEPAD(f,L) cuts or zero-extends f to length L by inserting
        zeros in the middle of the vector, or by cutting in the middle
        of the vector.
     
        If f is whole-point even, MIDDLEPAD(f,L) will also be whole-point
        even.
     
        MIDDLEPAD(f,L,dim) does the same along dimension dim.
        
        If f has even length, then f will not be purely zero-extended, but
        the last element will be repeated once and multiplied by 1/2.
        That is, the support of f will increase by one!
     
        Adding the flag 'wp' as the last argument will cut or extend whole point
        even functions.  Adding 'hp' will do the same for half point even
        functions.
     
     *Url*: <http://ltfat.github.io/doc/fourier/middlepad.html>

     See also: isevenfunction, fir2long, fftresample.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
MIDDLEPAD  Symmetrically zero-extends or cuts a function
   Usage:  h=middlep...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
modcent


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 359
 -- Function: modcent
     MODCENT  Centered modulo
        Usage:  y=modcent(x,r);
     
        MODCENT(x,r) computes the modulo of x in the range [-r/2,r/2[.
     
        As an example, to compute the modulo of x in the range [-pi,pi[ use
        the call:
     
          y = modcent(x,2*pi);
     *Url*: <http://ltfat.github.io/doc/fourier/modcent.html>


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
MODCENT  Centered modulo
   Usage:  y=modcent(x,r);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
nextfastfft


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1679
 -- Function: nextfastfft
     NEXTFASTFFT  Next higher number with a fast FFT
        Usage: nfft=nextfastfft(n);
     
        NEXTFASTFFT(n) returns the next number greater than or equal to n,
        for which the computation of a FFT is fast. Such a number is solely
        comprised of small prime-factors of 2, 3, 5 and 7.
     
        NEXTFASTFFT is intended as a replacement of nextpow2, which is often
        used for the same purpose. However, a modern FFT implementation (like
        FFTW) usually performs well for sizes which are powers or 2,3,5 and 7,
        and not only just for powers of 2.
     
        The algorithm will look up the best size in a table, which is computed
        the first time the function is run. If the input size is larger than the
        largest value in the table, the input size will be reduced by factors of
        2, until it is in range.
     
        [n,nfft]=NEXTFASTFFT(n) additionally returns the table used for
        lookup.
     
     
     
        References:
          J. Cooley and J. Tukey. An algorithm for the machine calculation of
          complex Fourier series. Math. Comput, 19(90):297--301, 1965.
          
          M. Frigo and S. G. Johnson. The design and implementation of FFTW3.
          Proceedings of the IEEE, 93(2):216--231, 2005. Special issue on
          "Program Generation, Optimization, and Platform Adaptation".
          
          P. L. Soendergaard. LTFAT-note 17: Next fast FFT size. Technical report,
          Technical University of Denmark, 2011.
          
     *Url*: <http://ltfat.github.io/doc/fourier/nextfastfft.html>

     See also: ceil23, ceil235, demo_nextfastfft.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 78
NEXTFASTFFT  Next higher number with a fast FFT
   Usage: nfft=nextfastfft(n);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
pbspline


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2658
 -- Function: pbspline
     PBSPLINE   Periodized B-spline
        Usage:   g=pbspline(L,order,a,...);
                 [g,nlen]=pbspline(L,order,a,...);
     
        Input parameters:
              L      : Length of window.
              order  : Order of B-spline.
              a      : Time-shift parameter for partition of unity.
        Output parameters:
              g      : Fractional B-spline.
              nlen   : Number of non-zero elements in out.
     
        PBSPLINE(L,order,a) computes a (slightly modified) B-spline of order
        order of total length L.
     
        If shifted by the distance a, the returned function will form a
        partition of unity. The result is normalized such that the functions sum
        to 1/sqrt(a).
     
        PBSPLINE takes the following flags at the end of the input arguments:
     
          'ed'     Even discrete fractional spline. This is the default
     
          'xd'     'flat' discrete fractional spline.
     
          'stard'  'pointy' discrete fractional spline
     
          'ec'     Even fractional spline by sampling.
     
          'xc'     'flat' fractional spline by sampling.
     
          'starc'  'pointy' fractional spline by sampling.
     
          'wp'     Generate whole point centered splines. This is the default.
     
          'hp'     Generate half point centered splines.
     
        The different types are accurately described in the referenced paper.
        Generally, the 'd' types of splines are very fast to compute, while
        the 'c' types are samplings of the continuous splines. The 'e' types
        coincides with the regular B-splines for integer orders. The 'x' types
        do not coincide, but generate Gabor frames with favorable frame
        bounds. The default type is 'ed' to guarantee fast computation and a
        familiar shape of the splines.
     
        [out,nlen]=PBSPLINE(...) will additionally compute the number of
        non-zero elements in out.
     
        If nlen = L, the function returned will be a periodization of a
        B-spline.
     
        If nlen < L, you can choose to remove the additional zeros by calling
        g=middlepad(g,nlen).
     
        Additionally, PBSPLINE accepts flags to normalize the output. Please
        see the help of SETNORM. Default is to use 'peak' normalization.
     
     
     
        References:
          P. L. Soendergaard. Symmetric, discrete fractional splines and Gabor
          systems. preprint, 2008.
          
     *Url*: <http://ltfat.github.io/doc/fourier/pbspline.html>

     See also: pgauss, firwin, middlepad, setnorm, demo_pbspline.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
PBSPLINE   Periodized B-spline
   Usage:   g=pbspline(L,order,a,...);
       ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
pchirp


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1418
 -- Function: pchirp
     PCHIRP  Periodic chirp
        Usage:  g=pchirp(L,n);
     
        PCHIRP(L,n) returns a periodic, discrete chirp of length L that
        revolves n times around the time-frequency plane in frequency. n must be
        an integer number.
     
        To get a chirp that revolves around the time-frequency plane in time,
        use :
     
          dft(pchirp(L,N));  
     
        The chirp is computed by:
        
            g(l+1) = exp(pi*i*n*(l-ceil(L/2))^2*(L+1)/L) for l=0,...,L-1
     
        The chirp has absolute value 1 everywhere. To get a chirp with unit
        l^2-norm, divide the chirp by sqrt L.
     
        Examples:
        ---------
     
        A spectrogram on a linear scale of an even length chirp:
     
          sgram(pchirp(40,2),'lin');
     
        The DFT of the same chirp, now revolving around in time:
     
          sgram(dft(pchirp(40,2)),'lin');
     
        An odd-length chirp. Notice that the chirp starts at a frequency between
        two sampling points:
     
          sgram(pchirp(41,2),'lin');
        
     
        References:
          H. G. Feichtinger, M. Hazewinkel, N. Kaiblinger, E. Matusiak, and
          M. Neuhauser. Metaplectic operators on c^n. The Quarterly Journal of
          Mathematics, 59(1):15--28, 2008.
          
     *Url*: <http://ltfat.github.io/doc/fourier/pchirp.html>

     See also: dft, expwave.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
PCHIRP  Periodic chirp
   Usage:  g=pchirp(L,n);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
pconv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1213
 -- Function: pconv
     PCONV  Periodic convolution
        Usage:  h=pconv(f,g)
                h=pconv(f,g,ftype); 
     
        PCONV(f,g) computes the periodic convolution of f and g. The convolution
        is given by
     
                    L-1
           h(l+1) = sum f(k+1) * g(l-k+1)
                    k=0
     
        PCONV(f,g,'r') computes the convolution where g is reversed
        (involuted) given by
     
                    L-1
           h(l+1) = sum f(k+1) * conj(g(k-l+1))
                    k=0
     
        This type of convolution is also known as cross-correlation.
     
        PCONV(f,g,'rr') computes the alternative where both f and g are
        reversed given by
     
                    L-1
           h(l+1) = sum conj(f(-k+1)) * conj(g(k-l+1))
                    k=0
          
        In the above formulas, l-k, k-l and -k are computed modulo L.
     
        The input arrays f and g can be 1D vectors or one of them can be
        a multidimensional array. In either case, the convolution is performed
        along columns with row vectors transformed to columns.
     
     *Url*: <http://ltfat.github.io/doc/fourier/pconv.html>

     See also: dft, involute.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
PCONV  Periodic convolution
   Usage:  h=pconv(f,g)
           h=pconv(f,g,ft...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
pderiv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 975
 -- Function: pderiv
     PDERIV   Derivative of smooth periodic function
        Usage:  fd=pderiv(f);
                fd=pderiv(f,dim);
                fd=pderiv(f,dim,difforder);
     
        PDERIV(f) will compute the derivative of f using a 4th order
        centered finite difference scheme. f must have been obtained by a
        regular sampling. If f is a matrix, the derivative along the columns
        will be found.
     
        PDERIV(f,dim) will do the same along dimension dim.
     
        PDERIV(f,dim,difforder) uses a centered finite difference scheme of
        order difforder instead of the default.
     
        PDERIV(f,dim,Inf) will compute the spectral derivative using a DFT.
     
        PDERIV assumes that f is a regular sampling of a function on the
        torus [0,1). The derivative of a function on a general torus [0,T)
        can be found by scaling the output by 1/T. 
     *Url*: <http://ltfat.github.io/doc/fourier/pderiv.html>


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
PDERIV   Derivative of smooth periodic function
   Usage:  fd=pderiv(f);
    ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
pebfun


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2422
 -- Function: pebfun
     PEBFUN Sampled, periodized EB-spline
        Usage: g=pebfun(L,w)
               g=pebfun(L,w,width)
               [g,nlen]=pebfun(...)
     
        Input parameters:
              L      : Window length.
              w      : Vector of weights of g*
              width  : integer stretching factor, the support of g is width*length(w)
     
        Output parameters:
              g      : The periodized EB-spline.
              nlen   : Number of non-zero elements in out.
     
        PEBFUN(L,w) computes samples of a periodized EB-spline with weights 
        w for a system of length L.
     
        PEBFUN(L,w,width) additionally stretches the function by a factor of 
        width.   
     
        [g,nlen]=ptpfundual(...) as g might have a compact support,
        nlen contains a number of non-zero elements in g. This is the case
        when g is symmetric. If g is not symmetric, nlen is extended
        to twice the length of the longer tail.
     
        If nlen = L, g has a 'full' support meaning it is a periodization
        of a EB spline function.
     
        If nlen < L, additional zeros can be removed by calling
        g=middlepad(g,nlen).
     
     
        References:
          K. Groechenig and J. Stoeckler. Gabor frames and totally positive
          functions. Duke Math. J., 162(6):1003--1031, 2013.
          
          S. Bannert, K. Groechenig, and J. Stoeckler. Discretized Gabor frames of
          totally positive functions. Information Theory, IEEE Transactions on,
          60(1):159--169, 2014.
          
          T. Kloos and J. Stockler. Full length article: Zak transforms and gabor
          frames of totally positive functions and exponential b-splines. J.
          Approx. Theory, 184:209--237, Aug. 2014. [1]http ]
          
          T. Kloos. Gabor frames total-positiver funktionen endlicher ordnung.
          Master's thesis, University of Dortmund, Dortmund, Germany, 2012.
          
          T. Kloos, J. Stockler, and K. Groechenig. Implementation of discretized
          gabor frames and their duals. IEEE Transactions on Information Theory,
          62(5):2759--2771, May 2016.
          
          References
          
          1. http://dx.doi.org/10.1016/j.jat.2014.05.010
          
     
     *Url*: <http://ltfat.github.io/doc/fourier/pebfun.html>

     See also: dgt, pebfundual, gabdualnorm, setnorm.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
PEBFUN Sampled, periodized EB-spline
   Usage: g=pebfun(L,w)
          g=pebf...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
pebfundual


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3989
 -- Function: pebfundual
     PEBFUNDUAL Dual window of sampled, periodized EB-spline
        Usage: g=pebfundual(w,a,M,L)
               g=pebfundual({w,width},a,M,L)
               g=pebfundual(...,inc)
     
        Input parameters: 
              w      : vector of weights of g
              width  : integer stretching factor of the window g*
              a      : time shift, given by an integer number of sampling points
              M      : number of channels
              L      : length of a period
              inc    : number of additional columns to compute window function
     
        Output parameters:
              gd     : Periodized dual window for the discrete EB-spline
     
        PEBFUNDUAL(w,a,M,L) computes samples of a dual window of EB spline
        with weights w. Please see PEBFUN for definition of EB splines.
        The lattice parameters a,M must satisfy M > a to ensure the
        system is a frame.
     
        PEBFUNDUAL({w,width},a,M,L) works as above but in addition the width*
        parameter determines the integer stretching factor of the original EB
        spline. For explanation see help of PEBFUN.
     
        PEBFUNDUAL(...,inc) or PEBFUNDUAL(...,'inc',inc) works as above, 
        but integer inc denotes number of additional columns to compute window 
        function gd. 'inc'-many are added at each side. It should be smaller than
        100 to have comfortable execution-time. The higher the number the
        closer gd is to the canonical dual window.
        The default value is 10.
     
        Examples:
        ---------
     
        The following example compares dual windows computed using 2 different
        approaches.:
           
          w = [-3,-1,1,3];a = 25; M = 31; inc = 1;
          L = 1e6; L = dgtlength(L,a,M);
          width = M;
      
          % Create the window
          g = pebfun(L,w,width);
      
          % Compute a dual window using pebfundual
          tic
          [gd,nlen] = pebfundual({w,width},a,M,L,inc);
          tebfundual=toc;
      
          % We know that gd has only nlen nonzero samples, lets shrink it.
          gd = middlepad(gd,nlen);
      
          % Compute the canonical window using gabdual
          tic
          gdLTFAT = gabdual(g,a,M,L);
          tgabdual=toc;
      
          fprintf('PEBFUNDUAL elapsed time %f sn',tebfundual);
          fprintf('GABDUAL elapsed time    %f sn',tgabdual);
      
          % Test on random signal
          f = randn(L,1);
      
          fr = idgt(dgt(f,g,a,M),gd,a,numel(f));
          fprintf('Reconstruction error PEBFUNDUAL: %en',norm(f-fr)/norm(f));
      
          fr = idgt(dgt(f,g,a,M),gdLTFAT,a,numel(f));  
          fprintf('Reconstruction error GABDUAL:    %en',norm(f-fr)/norm(f));
        
     
        References:
          K. Groechenig and J. Stoeckler. Gabor frames and totally positive
          functions. Duke Math. J., 162(6):1003--1031, 2013.
          
          S. Bannert, K. Groechenig, and J. Stoeckler. Discretized Gabor frames of
          totally positive functions. Information Theory, IEEE Transactions on,
          60(1):159--169, 2014.
          
          T. Kloos and J. Stockler. Full length article: Zak transforms and gabor
          frames of totally positive functions and exponential b-splines. J.
          Approx. Theory, 184:209--237, Aug. 2014. [1]http ]
          
          T. Kloos. Gabor frames total-positiver funktionen endlicher ordnung.
          Master's thesis, University of Dortmund, Dortmund, Germany, 2012.
          
          T. Kloos, J. Stockler, and K. Groechenig. Implementation of discretized
          gabor frames and their duals. IEEE Transactions on Information Theory,
          62(5):2759--2771, May 2016.
          
          References
          
          1. http://dx.doi.org/10.1016/j.jat.2014.05.010
          
     
     *Url*: <http://ltfat.github.io/doc/fourier/pebfundual.html>

     See also: dgt, idgt, pebfun.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
PEBFUNDUAL Dual window of sampled, periodized EB-spline
   Usage: g=pebfundua...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
peven


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 370
 -- Function: peven
     PEVEN   Even part of periodic function
        Usage:  fe=peven(f);
                fe=peven(f,dim);
     
        PEVEN(f) returns the even part of the periodic sequence f.
     
        PEVEN(f,dim) does the same along dimension dim.
     
     *Url*: <http://ltfat.github.io/doc/fourier/peven.html>

     See also: podd, dft, involute, pconv.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
PEVEN   Even part of periodic function
   Usage:  fe=peven(f);
           fe=...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
pgauss


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4272
 -- Function: pgauss
     PGAUSS  Sampled, periodized Gaussian
        Usage: g=pgauss(L);
               g=pgauss(L,tfr);
               g=pgauss(L,...);
               [g,tfr]=pgauss( ... );
      
        Input parameters:
              L    : Length of vector.
              tfr  : ratio between time and frequency support.
     
        Output parameters:
              g    : The periodized Gaussian.
     
        PGAUSS(L,tfr) computes samples of a periodized Gaussian. The function
        returns a regular sampling of the periodization of the function
        exp(-pi*(x.^2/tfr)).
     
        The l^2 norm of the returned Gaussian is equal to 1.
     
        The parameter tfr determines the ratio between the effective support
        of g and the effective support of the DFT of g. If tfr>1 then g*
        has a wider support than the DFT of g.
     
        PGAUSS(L) does the same setting tfr=1.
     
        [g,tfr] = PGAUSS( ... ) will additionally return the time-to-frequency
        support ratio. This is useful if you did not specify it (i.e. used the
        'width' or 'bw' flag).
     
        The function is whole-point even. This implies that fft(PGAUSS(L,tfr))
        is real for any L and tfr. The DFT of g is equal to
        PGAUSS(L,1/tfr).
     
        In addition to the 'width' flag, PGAUSS understands the following
        flags at the end of the list of input parameters:
     
          'fs',fs     Use a sampling rate of fs Hz as unit for specifying the
                      width, bandwidth, centre frequency and delay of the
                      Gaussian. Default is fs=[] which indicates to measure
                      everything in samples.
     
          'width',s   Set the width of the Gaussian such that it has an
                      effective support of s samples. This means that
                      approx. 96% of the energy or 79% of the area
                      under the graph is contained within s samples. 
                      This corresponds to -6dB or to width at the
                      half of the height. 
                      This is equivalent to calling PGAUSS(L,pi*s^2/4L*log(2)).
     
          'atheight',ah  Used only in conjuction with 'width'. Forces the 
                         Gaussian to width s at the ah fraction of the
                         height.
     
          'bw',bw     As for the 'width' argument, but specifies the width
                      in the frequency domain. The bandwidth is measured in 
                      normalized frequencies, unless the 'fs' value is given.
     
          'cf',cf     Set the centre frequency of the Gaussian to fc.  
     
          'wp'        Output is whole point even. This is the default.
     
          'hp'        Output is half point even, as most Matlab filter
                      routines.
     
          'delay',d   Delay the output by d. Default is zero delay.
     
        In addition to these parameteres, PGAUSS accepts any of the flags
        from SETNORM. The output will be normalized as specified.
     
        If this function is used to generate a window for a Gabor frame, then
        the window giving the smallest frame bound ratio is generated by
        PGAUSS(L,a*M/L).
     
        Examples:
        ---------
     
        This example creates a Gaussian function, and demonstrates that it is
        its own Discrete Fourier Transform:
     
          g=pgauss(128);
     
          % Test of DFT invariance: Should be close to zero.
          norm(g-dft(g))
      
        The next plot shows the Gaussian in the time domain:
     
          plot(fftshift(pgauss(128)));
      
        The next plot shows the Gaussian in the frequency domain on a log scale:
     
          magresp(pgauss(128),'dynrange',100);
          
        The next plot shows the Gaussian in the time-frequency plane:
      
          sgram(pgauss(128),'tc','nf','lin');
     
     
     
        References:
          S. Mallat and Z. Zhang. Matching pursuits with time-frequency
          dictionaries. IEEE Trans. Signal Process., 41(12):3397--3415, 1993.
          
     *Url*: <http://ltfat.github.io/doc/fourier/pgauss.html>

     See also: dgtlength, psech, firwin, pbspline, setnorm, demo_pgauss.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
PGAUSS  Sampled, periodized Gaussian
   Usage: g=pgauss(L);
          g=pgaus...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
pheaviside


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 831
 -- Function: pheaviside
     PHEAVISIDE  Periodic Heaviside function
        Usage: h=pheaviside(L);
     
        PHEAVISIDE(L) returns a periodic Heaviside function. The periodic
        Heaviside function takes on the value 1 for indices corresponding to
        positive frequencies, 0 corresponding to negative frequencies and the
        value .5 for the zero and Nyquist frequencies.
     
        To get a function that weights the negative frequencies by 1 and the
        positive by 0, use involute(PHEAVISIDE(L))
     
        As an example, the PHEAVISIDE function can be use to calculate the
        Hilbert transform for a column vector f*:
     
          h=2*ifft(fft(f).*pheaviside(length(f)));
     
     *Url*: <http://ltfat.github.io/doc/fourier/pheaviside.html>

     See also: middlepad, involute, fftindex.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 66
PHEAVISIDE  Periodic Heaviside function
   Usage: h=pheaviside(L);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
pherm


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3129
 -- Function: pherm
     PHERM  Periodized Hermite function
        Usage: g=pherm(L,order);
               g=pherm(L,order,tfr);
               [g,D]=pherm(...);
      
        Input parameters:
           L     : Length of vector.
           order : Order of Hermite function.
           tfr   : ratio between time and frequency support.
        Output parameters:
           g     : The periodized Hermite function
     
        PHERM(L,order,tfr) computes samples of a periodized Hermite function
        of order order. order is counted from 0, so the zero'th order
        Hermite function is the Gaussian.
     
        The parameter tfr determines the ratio between the effective support
        of g and the effective support of the DFT of g. If tfr>1 then g*
        has a wider support than the DFT of g.
     
        PHERM(L,order) does the same setting tfr=1.
     
        If order is a vector, PHERM will return a matrix, where each column
        is a Hermite function with the corresponding order.
     
        [g,D]=PHERM(...) also returns the eigenvalues D of the Discrete
        Fourier Transform corresponding to the Hermite functions.
     
        The returned functions are eigenvectors of the DFT. The Hermite
        functions are orthogonal to all other Hermite functions with a
        different eigenvalue, but eigenvectors with the same eigenvalue are
        not orthogonal (but see the flags below).
     
        PHERM takes the following flags at the end of the line of input
        arguments:
     
          'accurate'  Use a numerically very accurate that computes each
                      Hermite function individually. This is the default.
     
          'fast'      Use a less accurate algorithm that calculates all the
                      Hermite up to a given order at once.
     
          'noorth'    No orthonormalization of the Hermite functions. This is
                      the default.
     
          'polar'     Orthonormalization of the Hermite functions using the
                      polar decomposition orthonormalization method.
     
          'qr'        Orthonormalization of the Hermite functions using the
                      Gram-Schmidt orthonormalization method (usign qr).
     
        If you just need to compute a single Hermite function, there is no
        speed difference between the 'accurate' and 'fast' algorithm.
     
        Examples:
        ---------
     
        The following plot shows the spectrograms of 4 Hermite functions of
        length 200 with order 1, 10, 100, and 190:
     
          subplot(2,2,1);
          sgram(pherm(200,1),'nf','tc','lin','nocolorbar'); axis('square');
     
          subplot(2,2,2);
          sgram(pherm(200,10),'nf','tc','lin','nocolorbar'); axis('square');
         
          subplot(2,2,3);
          sgram(pherm(200,100),'nf','tc','lin','nocolorbar'); axis('square');
         
          subplot(2,2,4);
          sgram(pherm(200,190),'nf','tc','lin','nocolorbar'); axis('square');
     
     *Url*: <http://ltfat.github.io/doc/fourier/pherm.html>

     See also: hermbasis, pgauss, psech.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
PHERM  Periodized Hermite function
   Usage: g=pherm(L,order);
          g=ph...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
plotfft


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2630
 -- Function: plotfft
     PLOTFFT  Plot the output from FFT
        Usage: plotfft(coef);
               plotfft(coef,fs);
     
        PLOTFFT(coef) plots the output from the fft function. The
        frequency axis will use normalized frequencies between 0 and 1 (the
        Nyquist frequency).
     
        PLOTFFT(coef,fs) does the same for the FFT of a signal sampled at
        a sampling rate of fs Hz.
     
        PLOTFFT(coef,fs,dynrange) additionally limits the dynamic range of the
        plot. See the description of the 'dynrange' parameter below.
     
        PLOTFFT accepts the following optional arguments:
     
          'dynrange',r  Limit the dynamical range to r by using a colormap in
                        the interval [chigh-r,chigh], where chigh is the highest
                        value in the plot. The default value of [] means to not
                        limit the dynamical range. 
     
          'db'         Apply 20*log_{10} to the coefficients. This makes 
                       it possible to see very weak phenomena, but it might show 
                       too much noise. This is the default.
     
          'dbsq'       Apply 10*log_{10} to the coefficients. Same as the
                       'db' option, but assumes that the input is already squared.  
     
          'lin'        Show the coefficients on a linear scale. This will
                       display the raw input without any modifications. Only works for
                       real-valued input.
                      
          'linsq'      Show the square of the coefficients on a linear scale.
                      
          'linabs'     Show the absolute value of the coefficients on a linear
                       scale.
     
          'nf'         Display negative frequencies, with the zero-frequency
                       centered in the middle. This is the default.
     
          'posfreq'    Display only the positive frequencies.
     
          'dim',dim  If coef is multidimensional, dim indicates the 
                     dimension along which are the individual channels oriented.
                     Value 1 indicates columns, value 2 rows.
     
          'flog'     Use logarithmic scale for the frequency axis. This flag is
                     only valid in conjuction with the 'posfreq' flag.
     
     
        In addition to these parameters, PLOTFFT accepts any of the flags
        from SETNORM. The coefficients will be normalized as specified
        before plotting.
     
     *Url*: <http://ltfat.github.io/doc/fourier/plotfft.html>

     See also: plotfftreal.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
PLOTFFT  Plot the output from FFT
   Usage: plotfft(coef);
          plotfft(...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
plotfftreal


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2549
 -- Function: plotfftreal
     PLOTFFTREAL  Plot the output from FFTREAL  
        Usage: plotfftreal(coef);
               plotfftreal(coef,fs);
     
        PLOTFFTREAL(coef) plots the output from the FFTREAL function. The
        frequency axis will use normalized frequencies between 0 and 1 (the
        Nyquist frequency). It is assumed that the length of the original
        transform was even.
     
        PLOTFFTREAL(coef,fs) does the same for the FFTREAL of a signal
        sampled at a sampling rate of fs Hz.
     
        PLOTFFTREAL(coef,fs,dynrange) additionally limits the dynamic range of the
        plot. See the description of the 'dynrange' parameter below.
     
        PLOTFFTREAL accepts the following optional arguments:
     
          'dynrange',r  Limit the dynamical range to r by using a colormap in
                        the interval [chigh-r,chigh], where chigh is the highest
                        value in the plot. The default value of [] means to not
                        limit the dynamical range. 
     
          'db'      Apply 20*log_{10} to the coefficients. This makes 
                    it possible to see very weak phenomena, but it might show 
                    too much noise. This is the default.
     
          'dbsq'    Apply 10*log_{10} to the coefficients. Same as the
                    'db' option, but assumes that the input is already squared.  
     
          'lin'     Show the coefficients on a linear scale. This will
                    display the raw input without any modifications. Only works for
                    real-valued input.
     
          'linsq'   Show the square of the coefficients on a linear scale.
     
          'linabs'  Show the absolute value of the coefficients on a linear
                    scale.
          
          'N',N     Specify the transform length N. Use this if you are
                    unsure if the original input signal was of even length.
     
          'dim',dim  If coef is multidimensional, dim indicates the 
                     dimension along which are the individual channels oriented.
                     Value 1 indicates columns, value 2 rows.
     
          'flog'  Use logarithmic scale for the frequency axis.
     
     
        In addition to these parameters, PLOTFFTREAL accepts any of the flags
        from SETNORM. The coefficients will be normalized as specified
        before plotting.
     
     *Url*: <http://ltfat.github.io/doc/fourier/plotfftreal.html>

     See also: plotfft, fftreal.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
PLOTFFTREAL  Plot the output from FFTREAL  
   Usage: plotfftreal(coef);
    ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
podd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 362
 -- Function: podd
     PODD   Odd part of periodic function
        Usage:  fe=podd(f);
                fe=podd(f,dim);
     
        PODD(f) returns the odd part of the periodic sequence f.
     
        PODD(f,dim) does the same along dimension dim.
     
     *Url*: <http://ltfat.github.io/doc/fourier/podd.html>

     See also: peven, dft, involute, pconv.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
PODD   Odd part of periodic function
   Usage:  fe=podd(f);
           fe=pod...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
prect


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1106
 -- Function: prect
     PRECT   Periodic rectangle
        Usage:  f=prect(L,n);
     
        psinc(L,n) computes the periodic rectangle (or square) function of
        length L supported on n samples. The DFT of the periodic
        rectangle function in the periodic sinc function, PSINC.
     
         If n is odd, the output will be supported on exactly n samples
          centered around the first sample.
     
         If n is even, the output will be supported on exactly n+1 samples
          centered around the first sample. The function value on the two
          samples on the edge of the function will have half the magnitude of
          the other samples.
     
        Examples:
        ---------
     
        This figure displays an odd length periodic rectangle:
     
          stem(prect(30,11));
          ylim([-.2 1.2]);
     
        This figure displays an even length periodic rectangle. Notice the
        border points:
     
          stem(prect(30,12));
          ylim([-.2 1.2]);
     
     *Url*: <http://ltfat.github.io/doc/fourier/prect.html>

     See also: psinc.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
PRECT   Periodic rectangle
   Usage:  f=prect(L,n);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
psech


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2875
 -- Function: psech
     PSECH  Sampled, periodized hyperbolic secant
        Usage: g=psech(L);
               g=psech(L,tfr);
               g=psech(L,s,'samples);
               [g,tfr]=psech( ... );
     
        Input parameters:
           L   : Length of vector.
           tfr : ratio between time and frequency support.
        Output parameters:
           g   : The periodized hyperbolic cosine.
     
        PSECH(L,tfr) computes samples of a periodized hyperbolic secant.
        The function returns a regular sampling of the periodization
        of the function sech(pi*x)
     
        The returned function has norm equal to 1.
     
        The parameter tfr determines the ratio between the effective support
        of g and the effective support of the DFT of g. If tfr>1 then g*
        has a wider support than the DFT of g.
     
        PSECH(L) does the same setting tfr=1.
     
        PSECH(L,s,'samples') returns a hyperbolic secant with an effective
        support of s samples. This means that approx. 96% of the energy or 74%
        or the area under the graph is contained within s samples. This is
        equivalent to PSECH(L,s^2/L).
     
        [g,tfr] = PSECH( ... ) additionally returns the time-to-frequency
        support ratio. This is useful if you did not specify it (i.e. used
        the 'samples' input format).
     
        The function is whole-point even.  This implies that fft(PSECH(L,tfr))
        is real for any L and tfr.
     
        If this function is used to generate a window for a Gabor frame, then
        the window giving the smallest frame bound ratio is generated by
        PSECH(L,a*M/L).
     
        Examples:
        ---------
     
        This example creates a PSECH function, and demonstrates that it is
        its own Discrete Fourier Transform:
     
          g=psech(128);
     
          % Test of DFT invariance: Should be close to zero.
          norm(g-dft(g))
      
        The next plot shows the PSECH in the time domain compared to the Gaussian:
     
          plot((1:128)',fftshift(pgauss(128)),...
               (1:128)',fftshift(psech(128)));
          legend('pgauss','psech');
      
        The next plot shows the PSECH in the frequency domain on a log
        scale compared to the Gaussian:
     
          hold all;
          magresp(pgauss(128),'dynrange',100);
          magresp(psech(128),'dynrange',100);
          legend('pgauss','psech');
          
        The next plot shows PSECH in the time-frequency plane:
      
          sgram(psech(128),'tc','nf','lin');
     
     
        References:
          A. J. E. M. Janssen and T. Strohmer. Hyperbolic secants yield Gabor
          frames. Appl. Comput. Harmon. Anal., 12(2):259--267, 2002.
          
     *Url*: <http://ltfat.github.io/doc/fourier/psech.html>

     See also: pgauss, pbspline, pherm.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
PSECH  Sampled, periodized hyperbolic secant
   Usage: g=psech(L);
          ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
psinc


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 557
 -- Function: psinc
     PSINC   Periodic Sinc function (Dirichlet function)
        Usage:  f=psinc(L,n);
     
        PSINC(L,n) computes the periodic Sinc function of length L with
        n-1 local extrema. The DFT of the periodic Sinc function is the
        periodic rectangle, PRECT, of length n.
     
        Examples:
        ---------
     
        This figure displays a the periodic sinc function with 6 local extremas:
     
          plot(psinc(30,7));
     
     *Url*: <http://ltfat.github.io/doc/fourier/psinc.html>

     See also: prect.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 76
PSINC   Periodic Sinc function (Dirichlet function)
   Usage:  f=psinc(L,n);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
ptpfun


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2290
 -- Function: ptpfun
     PTPFUN Sampled, periodized totally positive function of finite type
        Usage: g=ptpfun(L,w)
               g=ptpfun(L,w,width)
     
        Input parameters:
              L    : Window length.
              w    : Vector of reciprocals w_j=1/delta_j in Fourier representation of g*
              width: Integer stretching factor for the essential support of g 
     
        Output parameters:
              g    : The periodized totally positive function.
     
        PTPFUN(L,w) computes samples of a periodized totally positive
        function of finite type >=2 with weights w for a system of length L.
        The Fourier representation of the continuous TP function is given as:
     
                       m
           ghat(f) = prod (1+2pijf/w(i))^(-1),
                      i=1
     
        where m=numel(w)>= 2. The samples are obtained by discretizing
        the Zak transform of the function.
     
        w controls the function decay in the time domain. More specifically
        the function decays as exp(max(w)x) for x->infty and exp(min(w)x)
        for x->-infty assuming w contains both positive and negative
        numbers.
     
        PTPFUN(L,w,width) additionally stretches the function by a factor of 
        width.
     
     
        References:
          K. Groechenig and J. Stoeckler. Gabor frames and totally positive
          functions. Duke Math. J., 162(6):1003--1031, 2013.
          
          S. Bannert, K. Groechenig, and J. Stoeckler. Discretized Gabor frames of
          totally positive functions. Information Theory, IEEE Transactions on,
          60(1):159--169, 2014.
          
          T. Kloos and J. Stockler. Full length article: Zak transforms and gabor
          frames of totally positive functions and exponential b-splines. J.
          Approx. Theory, 184:209--237, Aug. 2014. [1]http ]
          
          T. Kloos. Gabor frames total-positiver funktionen endlicher ordnung.
          Master's thesis, University of Dortmund, Dortmund, Germany, 2012.
          
          References
          
          1. http://dx.doi.org/10.1016/j.jat.2014.05.010
          
     
     *Url*: <http://ltfat.github.io/doc/fourier/ptpfun.html>

     See also: dgt, ptpfundual, gabdualnorm, setnorm.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
PTPFUN Sampled, periodized totally positive function of finite type
   Usage:...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
ptpfundual


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4399
 -- Function: ptpfundual
     PTPFUNDUAL Sampled, periodized dual TP function of finite type
        Usage: gd=ptpfundual(w,a,M,L)
               gd=ptpfundual({w,width},a,M,L)
               gd=ptpfundual(...,inc)
               [gd,nlen]=ptpfundual(...)
     
        Input parameters:
              w      : Vector of reciprocals w_j=1/delta_j in Fourier representation of g*
              width  : Integer stretching factor for the essential support
              a      : Length of time shift.
              M      : Number of channels.
              L      : Window length.
              inc    : Extension parameter
     
        Output parameters:
              gd    : The periodized totally positive function dual window.
              nlen  : Number of non-zero elements in gd.
     
        PTPFUNDUAL(w,a,M,L) computes samples of a dual window of totally
        positive function of finite type >=2 with weights w. Please see
        PTPFUN for definition of totally positive functions.
        The lattice parameters a,M must satisfy M > a to ensure the
        system is a frame.
     
        PTPFUNDUAL({w,width},a,M,L) works as above but in addition the width*
        parameter determines the integer stretching factor of the original TP
        function. For explanation see help of PTPFUN.
     
        PTPFUNDUAL(...,inc) or PTPFUNDUAL(...,'inc',inc) works as above, 
        but integer inc denotes number of additional columns to compute window
        function gd. 'inc'-many are added at each side. It should be smaller 
        than 100 to have comfortable execution-time. The higher the number the 
        closer gd is to the canonical dual window.
        The default value is 10.
     
        [gd,nlen]=PTPFUNDUAL(...) as gd might have a compact support,
        nlen contains a number of non-zero elements in gd. This is the case
        when gd is symmetric. If gd is not symmetric, nlen is extended
        to twice the length of the longer tail.
     
        If nlen = L, gd has a 'full' support meaning it is a periodization
        of a dual TP function.
     
        If nlen < L, additional zeros can be removed by calling
        gd=middlepad(gd,nlen).
     
        Examples:
        ---------
     
        The following example compares dual windows computed using 2 different
        approaches.:
      
          w = [-3,-1,1,3];a = 25; M = 31; inc = 10;
          L = 1e6; L = dgtlength(L,a,M);
          width = M;
      
          % Create the window
          g = ptpfun(L,w,width);
      
          % Compute a dual window using pebfundual
          tic
          [gd,nlen] = ptpfundual({w,width},a,M,L,inc);
          ttpfundual=toc;
      
          % We know that gd has only nlen nonzero samples, lets shrink it.
          gd = middlepad(gd,nlen);
      
          % Compute the canonical window using gabdual
          tic
          gdLTFAT = gabdual(g,a,M,L);
          tgabdual=toc;
      
          fprintf('PTPFUNDUAL elapsed time %f sn',ttpfundual);
          fprintf('GABDUAL elapsed time    %f sn',tgabdual);
      
          % Test on random signal
          f = randn(L,1);
      
          fr = idgt(dgt(f,g,a,M),gd,a,numel(f));
          fprintf('Reconstruction error PTPFUNDUAL: %en',norm(f-fr)/norm(f));
      
          fr = idgt(dgt(f,g,a,M),gdLTFAT,a,numel(f));  
          fprintf('Reconstruction error GABDUAL:    %en',norm(f-fr)/norm(f));
     
     
        References:
          K. Groechenig and J. Stoeckler. Gabor frames and totally positive
          functions. Duke Math. J., 162(6):1003--1031, 2013.
          
          S. Bannert, K. Groechenig, and J. Stoeckler. Discretized Gabor frames of
          totally positive functions. Information Theory, IEEE Transactions on,
          60(1):159--169, 2014.
          
          T. Kloos and J. Stockler. Full length article: Zak transforms and gabor
          frames of totally positive functions and exponential b-splines. J.
          Approx. Theory, 184:209--237, Aug. 2014. [1]http ]
          
          T. Kloos. Gabor frames total-positiver funktionen endlicher ordnung.
          Master's thesis, University of Dortmund, Dortmund, Germany, 2012.
          
          References
          
          1. http://dx.doi.org/10.1016/j.jat.2014.05.010
          
     *Url*: <http://ltfat.github.io/doc/fourier/ptpfundual.html>

     See also: dgt, idgt, ptpfun.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
PTPFUNDUAL Sampled, periodized dual TP function of finite type
   Usage: gd=p...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
pxcorr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 629
 -- Function: pxcorr
     PXCORR  Periodic cross correlation
        Usage:  h=pxcorr(f,g)
     
        PXCORR(f,g) computes the periodic cross correlation of the input
        signals f and g. The cross correlation is defined by
     
                    L-1
           h(l+1) = sum f(k+1) * conj(g(k-l+1))
                    k=0
     
        In the above formula, k-l is computed modulo L.
     
        PXCORR(f,g,'normalize') does the same, but normalizes the output by
        the product of the l^2-norm of f and g.
     
     *Url*: <http://ltfat.github.io/doc/fourier/pxcorr.html>

     See also: dft, pfilt, involute.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 59
PXCORR  Periodic cross correlation
   Usage:  h=pxcorr(f,g)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
shah


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1081
 -- Function: shah
     SHAH  Discrete Shah-distribution
        Usage: f=shah(L,a);
      
        SHAH(L,a) computes the discrete, normalized Shah-distribution of
        length L with a distance of a between the spikes.
     
        The Shah distribution is defined by 
     
           f(n*a+1)=1/sqrt(L/a) 
     
        for integer n, otherwise f is zero.
      
        This is also known as an impulse train or as the comb function, because
        the shape of the function resembles a comb. It is the sum of unit
        impulses ('diracs') with the distance a.
      
        If a divides L, then the DFT of SHAH(L,a) is SHAH(L,L/a).
      
        The Shah function has an extremely bad time-frequency localization.
        It does not generate a Gabor frame for any L and a.
     
        Examples:
        ---------
     
        A simple spectrogram of the Shah function (includes the negative
        frequencies to display the whole TF-plane):
     
          sgram(shah(256,16),'dynrange',80,'nf')
     
     *Url*: <http://ltfat.github.io/doc/fourier/shah.html>


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
SHAH  Discrete Shah-distribution
   Usage: f=shah(L,a);
 
   SHAH(L,a) comput...





