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

📄 task2.m

📁 自己编的LMS自适应算法的MATLAB源程序 本程序内容: 产生一个信号+白噪声序列
💻 M
字号:
% Adaptive filter 
close all; clear all; clc
f=[200;300];A=[1,2];fs=1000;t=(0:fs)/fs;
s=A*sin(2*pi*f*t);
u=wgn(1,length(t),0);
m=length(t);
subplot(311);
plot(t,s);
title('窄带周期信号2sin(2*pi*200*t)+sin(2*pi*300*)');
subplot(312);
plot(t,u);
title('宽带高斯白噪声');
x=s+u;
d=zeros(1,m);
d=x;

delay=3;
xshift=zeros(1,m);
for i=delay+1:m
    xshift(i)=x(i-delay);
end
    
[h,y,e] = lmsx(xshift,d,0.001,50);
subplot(313);
plot(t,y);
title('经过滤波的窄带周期信号');

⌨️ 快捷键说明

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