plotauto.m
来自「Introduction to Statistical and Adaptive」· M 代码 · 共 30 行
M
30 行
function plotauto(x,L,Fs,star)
% function plotauto(x,L,Fs,star)
% plots auto with 2/sqrt(length(x)) confidence limits
% x=input signal
% r=autocorrelation
% star='.' or '*', etc.
%
% Programmed by: Dimitris Manolakis, 10/4/93
%
%-----------------------------------------------------------
% Copyright 2000, by Dimitris G. Manolakis, Vinay K. Ingle,
% and Stephen M. Kogon. For use with the book
% "Statistical and Adaptive Signal Processing"
% McGraw-Hill Higher Education.
%-----------------------------------------------------------
N=length(x);
r=autofft(x,L);
r=r/r(1);
lag=(0:L-1)';
rp=ones(L,1)*2/sqrt(N);
rm=-ones(L,1)*2/sqrt(N);
lag=lag/Fs;
plot(lag,r,star,lag,rp,lag,rm);
ylabel('Autocorrelation');
xlabel('Time (seconds)');
text(1,0.1,'Confidence Limits');
grid;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?