• 大小: 3KB
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-06-16
  • 语言: Matlab
  • 标签:

资源简介

通原软件实验代码--数字信号基带调制PAM

资源截图

代码片段和文件信息

clear all
%close all

L=64;   %每个码元间隔内的采样点数
N=2^13;  %总采样点数
M=N/L;  %总码元数

Rs=5;  %kbit/s
Ts=1/Rs;  %码元间隔
T=M*Ts;
fs=N/T;
Bs=fs/2;
t=-T/2+(0:N-1)/fs;
f=-Bs+(0:N-1)/T;  

L1=L*0.25;  %占空比25%
L2=L*0.5;  %占空比50%
L3=L*0.75; %占空比75%

figure(3)
a=(randn(1M)>0);  %产生单极性数据
subplot(221)
tmp=zeros(LM); 
tmp((1:L1):)=ones(L11)*a;
s=tmp(:)‘;
S=t2f_1(sfs);
plot(ts);
grid on
axis ([-1 1 0 1.5]);
title(‘单极性,占空比25%‘)
subplot(223)
EP=spb(LNMfsTL1);
plot(f10*log10(EP))
grid on
title(‘功率谱图形‘)
xlabel(‘f(KHz)‘)
ylabel(‘功率谱密度(dB)‘);
axis ([-50 50 -60 0]);

b=sign((rand(1M)>0.5)-0.5); 
tmp=zeros(LM); 
tmp((1:L1):)=ones(L11)*b;
s=tmp(:)‘;
S=t2f_1(sfs);
subplot(222)
plot(ts);
grid on
axis ([-1 1 -1.5 1.5]);
title(‘双极性占空比25%‘);
subplot(224)
EP=dpb(LNMfsTL1);
plot(f10*log10(EP));grid on
title(‘功率谱图形‘)
axis ([-50 50 -60 0]);
xlabel(‘f(KHz)‘)
ylabel(‘功率谱密度(dB)‘);

figure(4)
a=(randn(1M)>0);  %产生单极性数据
subplot(221)
tmp=zeros(LM); 
tmp((1:L2):)=ones(L21)*a;
s=tmp(:)‘;
S=t2f_1(sfs);
plot(ts);
grid
axis ([-1 1 0 1.5]);
title(‘单极性,占空比50%‘)
subplot(223)
EP=spb(LNMfsTL2);
plot(f10*log10(EP));
grid;
title(‘功率谱图形‘)
xlabel(‘f(KHz)‘)
ylabel(‘功率谱密度(dB)‘);
axis ([-50 50 -60 0]);

b=sign((rand(1M)>0.5)-0.5); 
tmp=zeros(LM); 
tmp((1:L2):)=ones(L21)*b;
s=tmp(:)‘;
S=t2f_1(sfs);
subplot(222)
plot(ts);
grid
axis ([-1 1 -1.5 1.5]);
title(‘双极性占空比50%‘);
subplot(224)
EP=dpb

评论

共有 条评论

相关资源