This is where navigation should be.

IDGTREAL - Inverse discrete Gabor transform for real-valued signals

Usage

f=idgtreal(c,g,a,M);
f=idgtreal(c,g,a,M,Ls);

Input parameters

c Array of coefficients.
g Window function.
a Length of time shift.
M Number of channels.
Ls length of signal.

Output parameters

f Signal.

Description

idgtreal(c,g,a,M) computes the inverse discrete Gabor transform of the input coefficients c with respect to the real-valued window g, time shift a and number of channels M. c is assumed to be the positive frequencies of the Gabor expansion of a real-valued signal. It must hold that size(c,1)==floor(M/2)+1.

Note that since the correct number of channels cannot be deduced from the input, idgtreal takes an additional parameter as opposed to idgt.

The window g may be a vector of numerical values, a text string or a cell array. See the help of gabwin for more details.

idgtreal(c,g,a,M,Ls) does as above but cuts or extends f to length Ls.

[f,g]=idgtreal(...) additionally outputs the window used in the transform. This is usefull if the window was generated from a description in a string or cell array.

For perfect reconstruction, the window used must be a dual window of the one used to generate the coefficients.

If g is a row vector, then the output will also be a row vector. If c is 3-dimensional, then idgtreal will return a matrix consisting of one column vector for each of the TF-planes in c.

See the help on idgt for the precise definition of the inverse Gabor transform.

idgtreal takes the following flags at the end of the line of input arguments:

'freqinv' Use a frequency-invariant phase. This is the default convention described in the help for dgt.
'timeinv' Use a time-invariant phase. This convention is typically used in filter bank algorithms.

Examples:

The following example demostrates the basic pricinples for getting perfect reconstruction (short version):

f=greasy;            % test signal
a=32;                % time shift
M=64;                % frequency shift
gs={'blackman',128}; % synthesis window
ga={'dual',gs};      %  analysis window

[c,Ls]=dgtreal(f,ga,a,M); % analysis

% ... do interesting stuff to c at this point ...

r=idgtreal(c,gs,a,M,Ls); % synthesis

norm(f-r)                % test

The following example does the same as the previous one, with an explicit construction of the analysis and synthesis windows:

f=greasy;     % test signal
a=32;         % time shift
M=64;         % frequency shift
Ls=length(f); % signal length

% Length of transform to do
L=dgtlength(Ls,a,M);

% Analysis and synthesis window
gs=firwin('blackman',128);
ga=gabdual(gs,a,M,L);

c=dgtreal(f,ga,a,M);  % analysis

% ... do interesting stuff to c at this point ...

r=idgtreal(c,gs,a,M,Ls); % synthesis

norm(f-r)       % test