⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 phaselock.m

📁 Matlab时频分析工具箱,希望能对大家有所帮助啊
💻 M
字号:
function cout = phaselock(cin,a)%PHASELOCK  Phaselock Gabor coefficients%   Usage:  c=phaselock(c,a);%%   PHASELOCK(c,a) phaselocks the Gabor coefficients c. The coefficient must%   have been obtained from a DGT with parameter a.%%   Phaselocking the coefficients modifies them so as if they were obtained%   from a time-invariant Gabor system. A filter bank produces phase locked%   coefficients.%%   Phaselocking of Gabor coefficients correspond to the following transform:%   Consider a signal f of length L and define N=L/a and b=L/M.%   The output from c=PHASELOCK(DGT(f,g,a,M),a) is given by% %                  L-1 %     c(m+1,n+1) = sum f(l+1)*exp(-2*pi*i*(m*b-n*a)*l/L)*conj(g(l-a*n+1)), %                  l=0  % %   where m=0,...,M-1 and n=0,...,N-1 and l-an is computed modulo 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/>.%%   SEE ALSO: DGT IPHASELOCK SYMPHASE%%R  puc95%   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))*a;FreqInd = (0:(M-1))/M;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 + -