📄 wilbounds.m
字号:
function [AF,BF]=wilbounds(g,M,L)%WILBOUNDS Calculate frame bounds of Wilson basis.% Usage: [AF,BF]=wilbounds(g,M)% [AF,BF]=wilbounds(g,M,L)%% Input parameters:% g : Window function.% M : Number of channels.% L : Length of transform to do (optional)% Output parameters:% A,B : Frame bounds.% % WILBOUNDS(g,M) calculates the frame bounds of the% Wilson frame operator of the Wilson basis with window g and M% channels.%% If the optional parameter L is specified, the window is cut or% zero-extended to length L.%% SEE ALSO: GFBOUNDS% 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(2,3,nargin));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;if size(M,1)>1 || size(M,2)>1 error('M must be a scalar');end;if rem(M,1)~=0 error('M must be an integer.')end;if nargin==3 g=fir2iir(g,L);else L=length(g);end;if rem(L,M)~=0 error('The length of the transform must be dividable by M.');end;a=M;N=L/a;if rem(N,2)==1 error('L/M must be even.');end;% Get the factorization of the window.gf=comp_wfac(g,a,2*M);% Compute all eigenvalues.lambdas=comp_gfeigs(gf,L,a,2*M);% Min and max eigenvalue.AF=lambdas(1);BF=lambdas(size(lambdas,1));% Divide by 2 (only difference to gfeigs).AF=AF/2;BF=BF/2;if nargout<2 AF=BF/AF;end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -