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.

Package: ltfat