Function: nsdgtreal
NSDGTREAL  Non-stationary Discrete Gabor transform for real valued signals
  Usage:  c=nsdgtreal(f,g,a,M);
          [c,Ls]=nsdgtreal(f,g,a,M);

  Input parameters:
        f     : Input signal.
        g     : Cell array of window functions.
        a     : Vector of time positions of windows.
        M     : Vector of numbers of frequency channels.
  Output parameters:
        c     : Cell array of coefficients.
        Ls    : Length of input signal.

  NSDGTREAL(f,g,a,M) computes the non-stationary Gabor coefficients of the
  input signal f. The signal f can be a multichannel signal, given in
  the form of a 2D matrix of size Ls xW, with Ls the signal
  length and W the number of signal channels.

  As opposed to NSDGT only the coefficients of the positive frequencies
  of the output are returned. NSDGTREAL will refuse to work for complex
  valued input signals.

  The non-stationary Gabor theory extends standard Gabor theory by
  enabling the evolution of the window over time. It is therefor necessary
  to specify a set of windows instead of a single window.  This is done by
  using a cell array for g. In this cell array, the n'th element g{n}
  is a row vector specifying the n'th window.

  The resulting coefficients also require a storage in a cell array, as
  the number of frequency channels is not constant over time. More
  precisely, the n'th cell of c, c{n}, is a 2D matrix of size
  M(n)/2+1 xW and containing the complex local spectra of the
  signal channels windowed by the n'th window g{n} shifted in time at
  position a(n).  c{n}(m,l) is thus the value of the coefficient for
  time index n, frequency index m and signal channel l.

  The variable a contains the distance in samples between two
  consequtive blocks of coefficients. The variable M contains the
  number of channels for each block of coefficients. Both a and M are
  vectors of integers.

  The variables g, a and M must have the same length, and the result c*
  will also have the same length.
  
  The time positions of the coefficients blocks can be obtained by the
  following code. A value of 0 correspond to the first sample of the
  signal:

    timepos = cumsum(a)-a(1);

  [c,Ls]=NSDGTREAL(f,g,a,M) additionally returns the length Ls of the input 
  signal f. This is handy for reconstruction:

    [c,Ls]=nsdgtreal(f,g,a,M);
    fr=insdgtreal(c,gd,a,Ls);

  will reconstruct the signal f no matter what the length of f is, 
  provided that gd are dual windows of g.

  Notes:
  ------

  NSDGTREAL uses circular border conditions, that is to say that the signal is
  considered as periodic for windows overlapping the beginning or the 
  end of the signal.

  The phaselocking convention used in NSDGTREAL is different from the
  convention used in the DGT function. NSDGTREAL results are phaselocked (a
  phase reference moving with the window is used), whereas DGT results are
  not phaselocked (a fixed phase reference corresponding to time 0 of the
  signal is used). See the help on PHASELOCK for more details on
  phaselocking conventions.



  References:
    P. Balazs, M. Doerfler, F. Jaillet, N. Holighaus, and G. A. Velasco.
    Theory, implementation and applications of nonstationary Gabor frames.
    J. Comput. Appl. Math., 236(6):1481--1496, 2011.
    

Url: http://ltfat.github.io/doc/nonstatgab/nsdgtreal.html

See also: nsdgt, insdgtreal, nsgabdual, nsgabtight, phaselock, demo_nsdgt.

Package: ltfat