close all;
alpha=0.2;
Ts=1e-2;
Fs=1e3;
Rs=50;
M=2;
Num=100;
Samp_rate=Fs/Rs;
Eye_num=2;
NRZ=2*randint(1,Num,M)-M+1;
figure(1);
stem(NRZ);
title('双极性NRZ码元序列');
k=1;
for ii=1:Num
for jj=1:Samp_rate
Samp_data(k)=NRZ(ii);
k=k+1;
end
end
[ht,a]=rcosine(1/Ts,Fs,'fir',alpha);
figure(2);
subplot(2,1,1);
plot(ht);
ylabel('冲激响应');
title('升余弦滚降系统冲激响应');
st=conv(Samp_data,ht)/(Fs*Ts);
subplot(2,1,2);
plot(st);
ylabel('信号幅度');
title('经过升弦滚降系统后的码元');
eyediagram(st,40)
ylabel('信号幅度');
title('基带信号眼图');
D91