📄 gfbounds.m
字号:
function [AF,BF]=gfbounds(g,a,M,L)%GFBOUNDS Calculate frame bounds of Gabor frame.% Usage: fcond=gfbounds(g,a,M);% [A,B]=gfbounds(g,a,M);% [A,B]=gfbounds(g,a,M,L);%% Input parameters:% g : The window function.% a : Length of time shift.% M : Number of modulations.% L : Length of transform to consider.% Output parameters:% fcond : Frame condition number (B/A)% A,B : Frame bounds.% % GFBOUNDS(g,a,M) calculates the ratio B/A of the frame bounds% of the Gabor frame with window g, and parameters a, M.%% [A,B]=GFBOUNDS(g,a,M) calculates the frame bounds A and B% of the Gabor frame with window g, and parameters a, M. %% If the optional parameter L is specified, the window is cut or% zero-extended to length L.% 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/>.error(nargchk(3,4,nargin));assert_squarelat(a,M,1,'GFBOUNDS',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(:); end;end;Lwindow=length(g);Ls=Lwindow;if nargin<4 [b,N,L]=assert_L(Ls,Lwindow,[],a,M,'GFBOUNDS');else [b,N,L]=assert_L(Ls,Lwindow,L,a,M,'GFBOUNDS'); g=fir2iir(g,L);end;% Handle the Riesz basis (dual lattice) case.if a>M temp=M; M=a; a=temp;end;% Get the factorization of the window.gf=comp_wfac(g,a,M);% Compute all eigenvalues.lambdas=comp_gfeigs(gf,L,a,M);s=size(lambdas,1); % Min and max eigenvalue.AF=lambdas(1);BF=lambdas(s);if nargout<2 AF=BF/AF;end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -