lsa.m
来自「现代信号谱估计算法的matlab代码 调用函数代码」· M 代码 · 共 22 行
M
22 行
function a=lsa(y,w)
%
% lsa.m compute the complex amplitudes of
% sinusoidal components given the frequencies by a least-squares
% solution to the data.
%
% Model:
% y(n)=sum_{k=1}^p a_k e^{jw(k)n} + e(n), n= 0,...,N-1 (*)
%
%
% y -> 1d data vector
% w -> sinusoidal frequencies
% a <- the complex amplitude amplitude
%
y=y(:);
w=w(:);
A=exp(sqrt(-1)* (0:length(y)-1)'*w');
a=A\y;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?