📄 pisarenko.m
字号:
function [f,P] = pisarenko(Ryy)
%
% Compute the the modal frequencies using Pisarenko's method,
% then find the amplitudes
%
% function [f,P] = pisarenko(Ryy)
%
% Ryy = autocorrelation function from observed data
%
% f = vector of frequencies
% P = vector of amplitudes
% Copyright 1999 by Todd K. Moon
[n,n] = size(Ryy);
[v,u] = eig(Ryy);
sigma2 = u(n,n);
vm = v(:,n); % get eigenvector from smallest eigenvalue
r = roots(vm); % find roots of the polynomial
f = angle(conj(r))/(2*pi); % get angle and convert to Hz/sample
% Now compute the amplitudes
% Build up the coefficient matrix
for k=1:n-1
A(k,:) = exp(2*pi*j*k .* f)'
end
r = Ryy(1,2:n);
P = A\r;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -