musicfun.m

来自「Mathematical Methods by Moor n Stiling.」· M 代码 · 共 27 行

M
27
字号
function pf = musicfunc(f,p,V)
%
% Compute the "MUSIC spectrum" at a frequency f.
%
% function pf = musicfunc(f,p,V)
%
% f = frequency (may be an array of frequencies)
% p = order of system
% V = eigenvectors of autocorrelation matrix
%
% pf = plotting value for spectrum

% Copyright 1999 by Todd K. Moon

nf = length(f);
[M,M] = size(V);
id = 0:M-1;
 
for fcount=1:nf 
  mf = 0;
  s = exp(2*pi*j*f(fcount) .* id);
  for k=p+1:M
    temp = s*V(:,k);
    mf = mf + temp'*temp;
  end
  pf(fcount) = 1/mf;
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?