ftf2.m
来自「利用FTF算法实现了信道均衡的原程序代码。」· M 代码 · 共 41 行
M
41 行
clc
clear
close all
N=10; n=500;
for i=1:n
if rem(i,2)==0
x(i)=1;
d(i)=x(i);
else
x(i)=-1;
d(i)=x(i);
end
end
n1=10^(-0.25)*randn(1,n);
for k=1:n
x1(k)=x(k)+n1(k);
end
for v=1:100;
as(v)=x(v);
end
subplot(2,3,1);plot(as);title('信号');
subplot(2,3,2);plot(n1);title('噪声');
subplot(2,3,3);plot(x1);title('信号加噪声');
[e1,e2,y]=ftf1(x1,d,n,N);
for l=1:n
h(l)=y(l)/x1(l);
end
r=1:500;
subplot(2,3,4);plot(h);title('均衡器冲击响应');
subplot(2,3,5);semilogy(r,e2);title('学习曲线');xlabel('n叠代次数');ylabel('MSE(均方误差)');
figure(2)
plot(as);title('信号');
figure()
plot(n1);title('噪声');
figure()
plot(x1);title('信号加噪声');
figure()
plot(h);title('均衡器冲击响应');
figure()
semilogy(r,e2);title('学习曲线');xlabel('n叠代次数');ylabel('MSE(均方误差)');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?