⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aalmsonesteppredictor.m

📁 Source Code for Adaptive Filtering Primer
💻 M
字号:

function[w,y,e,J,w1]=aalmsonesteppredictor(x,mu,M)
%function[w,J,w1]=aalmsonesteppredictor(x,mu,M);
%x=data=signal plus noise;mu=step size factor;M=number of filter 
%coefficients;w1 is a matrix and each column is the history of each
%filter coefficient vesus time n;
N=length(x);
y=zeros(1,N);
w=zeros(1,M);
for n=M:N-1
    x1=x(n:-1:n-M+1);
    y(n)=w*x1';
    e(n)=x(n+1)-y(n);
    w=w+2*mu*e(n)*x1;
    w1(n-M+1,:)=w(1,:);
end;
J=e.^2;
%J is the learning curve of the adaptive process;

⌨️ 快捷键说明

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