📄 gabmul.m
字号:
function h=gabmul(f,c,p3,p4,p5)%GABMUL Gabor multiplier.% Usage: h=gabmul(f,c,a);% h=gabmul(f,c,g,a);% h=gabmul(f,c,ga,gs,a);%% Input parameters:% f : Input signal% c : symbol of Gabor multiplier% g : analysis/synthesis window% ga : analysis window% gs : synthesis window% a : Length of time shift.% Output parameters:% h : Output signal%% GABMUL(f,c,g,a) will filter f by a Gabor multiplier determined by% the symbol c over the rectangular time-frequency lattice determined by % a and M, where M is deduced from the size of c. The rows of c% correspond to frequency, the columns to temporal sampling points.% The window g will be used for both analysis and synthesis.%% GABMUL(f,c,a) will do the same using an optimally concentrated, tight% Gaussian as window function.%% GABMUL(f,c,ga,gs,a) will do the same using the window ga for% analysis and gs for synthesis.%% The adjoint operator of GABMUL(f,c,ga,gs,a) is given by% GABMUL(f,conj(c),gs,ga,a).%% SEE ALSO: DGT, IDGT, CANDUAL, CANTIGHT%% EXAMPLES: EXAMP_GABMUL% 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,5,nargin));M=size(c,1);N=size(c,2);if nargin==3 a=p3; L=a*N; ga=cantight(a,M,L); gs=ga;end;if nargin==4; ga=p3; gs=p3; a=p4; end;if nargin==5; ga=p3; gs=p4; a=p5;end;if numel(c)==1 error('Size of symbol is too small. You probably forgot to supply it.');end;[nga mga] = size(ga);if nga ~= 1 && mga~= 1 error('Window ga should be a vector')end [ngs mgs] = size(gs);if ngs ~= 1 && mgs~= 1 error('Window gs should be a vector')end assert_squarelat(a,M,'GABMUL',0);% Change f to correct shape.[f,Ls,W,wasrow,remembershape]=comp_sigreshape_pre(f,'DGT',0);[coef,Ls]=dgt(f,ga,a,M);for ii=1:W coef(:,:,ii)=coef(:,:,ii).*c;end;h=idgt(coef,gs,a,Ls);% Change h to have same shape as f originally had.h=comp_sigreshape_post(h,Ls,wasrow,remembershape);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -