4444

来源:互联网 发布:淘宝申请介入要几天 编辑:程序博客网 时间:2024/06/07 01:26

         
% check input argumentsif nargout==1 & nargin<4    error('Wrong number of input arguments');elseif nargout==2 & nargin<6    error('Wrong number of input arguments to compute time ticks');elseif nargin<7    N = size(Pxy,1);end% number of channelsNchn = size(Pxy,2);% define pre-whitening filterswitch lower(m)    case 'unfiltered'        % Unfiltered Cross-Correlation (UCC)        % -----------------------------------------------------------------        % this processor doesn't filter the cross-power applying a sort of        % time cross-correlation.        W = ones(N,Nchn);    case 'roth'        % Roth filter        % -----------------------------------------------------------------        % this processor suppress frequency regions where the noise is        % large than signals.        if size(Pxx)~=size(Pxy)            error('Roth filter: power spectra size must be the same');        end        W = ones(N,Nchn);        for k=1:Nchn            nonzero = find(Pxx(:,k));            W(nonzero,k) = 1 ./ Pxx(nonzero,k);        end    case 'scot'        % Smoothed Coherence Transform (SCOT)        % -----------------------------------------------------------------        % this processor exhibits the same spreading as the Roth processor.        if size(Pxx)~=size(Pyy) | size(Pxx)~=size(Pxy) | size(Pyy)~=size(Pxy)            error('SCOT filter: power spectra size must be the same');        end        W = ones(N,Nchn);        W_Den = (Pxx .* Pyy) .^ 0.5;        for k=1:Nchn            nonzero = find(W_Den(:,k));            W(nonzero,k) = 1 ./ W_Den(nonzero,k);        end    case 'phat'        % Phase Transform (PHAT)        % -----------------------------------------------------------------        % ad hoc technique devoleped to assign a specified weight according        % to the SNR.        W = ones(N,Nchn);        W_Den = abs(Pxy);        for k=1:Nchn            nonzero = find(W_Den(:,k));            W(nonzero,k) = 1 ./ W_Den(nonzero,k);        end    case 'cps-m'        % SCOT filter modified      

0 0
原创粉丝点击