📄 iphaselock.m
字号:
function cout = iphaselock(cin,a)%IPHASELOCK Inverse phase lock of Gabor coefficients% Usage: c=iphaselock(c,a);%% IPHASELOCK(c,a) removes phase locking from the Gabor coefficients c.% The coefficient must have been obtained from a DGT with parameter a.%% Phaselocking the coefficients modyfies them so as if they were obtained% from a time-invarient Gabor system. A filter bank produces phase locked% coeffiecients. %% SEE ALSO: DGT, PHASELOCK%% REFERENCES:% M. Puckette. Phase-locked vocoder. Applications of Signal Processing to% Audio and Acoustics, 1995., IEEE ASSP Workshop on, pages 222 -225,% 1995.% 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/>.% AUTHORS : Peter Balazs% Peter Soendergaard.error(nargchk(2,2,nargin));if (prod(size(a))~=1 || ~isnumeric(a)) error('a must be a scalar');end;if rem(a,1)~=0 error('a must be an integer');end;M=size(cin,1);N=size(cin,2);L=N*a;b=L/M;if rem(b,1)~=0 error('Lattice error. The a parameter is probably incorrect.');end;TimeInd = (0:(N-1))/N;FreqInd = (0:(M-1))*b;phase = FreqInd'*TimeInd;phase = exp(-2*i*pi*phase);% Handle multisignalscout=zeros(size(cin));for w=1:size(cin,3) cout(:,:,w) = cin(:,:,w).*phase;end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -