📄 idgt.m
字号:
function [f]=idgt(coef,g,a,Ls)%IDGT Inverse discrete Gabor transform.% Usage: f=idgt(c,g,a);% f=idgt(c,g,a,Ls);%% Input parameters:% c : Array of coefficients.% g : Window function.% a : Length of time shift.% Ls : length of signal.% Output parameters:% f : Signal.%% IDGT(c,g,a) computes the Gabor expansion of the input coefficients% c with respect to the window g and time shift a. The number of % channels is deduced from the size of the coefficients c.%% IDGT(c,g,a,Ls) does as above but cuts or extends f to length Ls.%% For perfect reconstruction, the window used must be a dual window of the% one used to generate the coefficients.%% Assume that f=IDGT(c,g,a,L) for an array c of size M x N. % Then the following holds for k=0,...,L-1: % % N-1 M-1 % f(l+1) = sum sum c(m+1,n+1)*exp(2*pi*i*m*l/M)*g(l-a*n+1)% n=0 m=0 % % SEE ALSO: DGT, DWILT, CANTIGHT% AUTHOR : Peter Soendergaard.% Check input paramameters.error(nargchk(3,4,nargin));if prod(size(g))==1 error('g must be a vector (you probably forgot to supply the window function as input parameter.)');end;wasrow=0;if size(g,2)>1 if size(g,1)>1 error('g must be a vector'); else % g was a row vector. g=g(:); % If the input window is a row vector, the output signal will also % be a row vector. wasrow=1; end;end;Lwindow=size(g,1);M=size(coef,1);N=size(coef,2);W=size(coef,3);% use assert_squarelat to check a and the window size.assert_squarelat(a,M,1,'IDGT');[b,Njunk,Lout]=assert_L(0,Lwindow,a,M,'IDGT');L=N*a;if Lout>L error('Window is too long.');end;% Do the actual computation.f=comp_idgt(coef,g,a,M,L);% Cut or extend f to the correct length, if desired.if nargin==4 f=postpad(f,Ls);else Ls=L;end;f=comp_sigreshape_post(f,Ls,wasrow,[0; W]);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -