心胸决定格局,眼界决定境界...

滤波器初始化状态 避免瞬时噪声 方法之一

% prepend sequence with mirror image of first points so that transients
% can be eliminated. then do same thing at right end of data sequence.
nfilt = nfilt+1;
itemp = 2*idata(1) - idata((nfilt+1):-1:2);%起始点 做成镜像,奇对称  ;初始化状态,避免瞬时噪声
[itemp,zi]=filter(b,1,itemp); %#ok   获取zi初始化状态
[odata,zf] = filter(b,1,idata,zi);   滤波

posted @ 2016-11-28 17:10  WELEN  阅读(479)  评论(0编辑  收藏  举报