📄 candual.m
字号:
function gamma=candual(g,a,M,L)%CANDUAL Canonical dual window.% Usage: gamma=candual(g,a,M);% gamma=candual(g,a,M,L);%% Input parameters:% g : Gabor window.% a : Length of time shift.% M : Number of channels.% L : Length of window. (optional)% Output parameters:% gamma : Canonical dual window.%% CANDUAL(g,a,M) computes the canonical dual window of the discrete% Gabor frame with window g and parameters a, M.%% If L is specified, then the window will be padded or truncated to% length L before the canonical dual window is calculated. gamma% will also have length L.%% If a>M then the dual window of the Gabor Riesz sequence with window g% and parameters a and M will be calculated.%% SEE ALSO: CANTIGHT, ISNORMALFORMerror(nargchk(3,4,nargin));if size(g,1)*size(g,2)==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(:); wasrow=1; end;end;assert_squarelat(a,M,1,'CANDUAL',0);Lwindow=length(g);Ls=Lwindow;if nargin<4 [b,N,L]=assert_L(-Ls,Lwindow,a,M,'CANDUAL');else [b,N,L]=assert_L(L,Lwindow,a,M,'CANDUAL'); g=firextend(g,L);end; % If input is real, output must be real as well.inputwasreal = isreal(g);if a>M % Handle the Riesz basis (dual lattice) case. gf=comp_wfac(g,M,a); gammaf=comp_candual_fac(gf,L,M,a)*a/M; gamma=comp_iwfac(gammaf,L,M,a); else % Handle the frame case gf=comp_wfac(g,a,M); gammaf=comp_candual_fac(gf,L,a,M); gamma=comp_iwfac(gammaf,L,a,M); end; if inputwasreal gamma=real(gamma);end; if wasrow gamma=gamma.';end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -