📄 wildual.m
字号:
function [gamma]=wildual(g,M,L)%WILDUAL Canonical dual window.% Usage: gamma=wildual(g,M);% gamma=wildual(g,M,L);%% Input parameters:% g : Gabor window.% M : Number of modulations.% L : Length of window. (optional)% Output parameters:% gamma : Canonical dual window.%% WILDUAL(g,M) returns the dual window of the Wilson or MDCT basis with% window g, parameter M and length equal to the length of the window g.%% WILDUAL(g,M,L) does the same, but now L is used as the length of the% Wilson basis. g will be cut or zero-extended to length L.%% The input window g must be whole-point even. If g is not whole-point% even, then reconstruction using the dual window will not be perfect.%% SEE ALSO: WILORTH, ISEVEN% This program is free software: you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation, either version 3 of the License, or% (at your option) any later version.% % This program is distributed in the hope that it will be useful,% but WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the% GNU General Public License for more details.% % You should have received a copy of the GNU General Public License% along with this program. If not, see <http://www.gnu.org/licenses/>.% Author : Peter Soendergaard.error(nargchk(2,3,nargin)); wasrow=0;if size(g,2)>1 if size(g,1)>1 error('g must be a vector'); else % g was a row vector. wasrow=1; g=g(:); end;end; assert_squarelat(M,M,1,'WILDUAL',0);Lwindow=length(g);Ls=Lwindow;% There is no reason to do special support for FIR Wilson windowsif nargin<3 [b,N,L]=assert_L(Ls,Lwindow,[],M,2*M,'WILDUAL');else [b,N,L]=assert_L(L,Lwindow,L,M,2*M,'WILDUAL'); g=fir2iir(g,L);end; % If input is real, output must be real as well.inputwasreal = isreal(g);a=M; gf=comp_wfac(g,a,2*M);gammaf=2*comp_candual_fac(gf,L,a,2*M);gamma=comp_iwfac(gammaf,L,a,2*M);if inputwasreal gamma=real(gamma);end; if wasrow gamma=gamma.';end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -