没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
实验代码
(1)
N=20; %生成20个点
nsamp=10; %nsamp:每个矩形脉冲的抽样点数,本实验就是采样频率
d=randi([0,1],1, N); %产生[0,1]分布的矩形脉冲
m=d*2-1; %化成双极性序列
a=rectpulse(m, nsamp); %绘制双极性码的矩形信号函数
figure(1);
subplot(311)
plot((1:N*nsamp)/nsamp,a);
title('基带信号');
xlabel('时间(s)');
axis([0,20,-2,2]);
grid on
[pst, f] = periodogram(a,boxcar(length(a)), 2048, nsamp);
subplot(312)
plot(f,pst); %信号的功率谱
pstf_db=10*log10(pst);
xlabel('频率(Hz)');
title('功率谱密度');
axis([0,5,0,15]);
grid on
subplot(313)
plot(f,pstf_db); %化为分贝形式
xlabel('频率(Hz)');
title('功率谱密度(dB)');
axis([0,5,-100,50]);
grid on;
(2)fs=100;
(1)
N=20; %生成20个点
nsamp=10; %nsamp:每个矩形脉冲的抽样点数,本实验就是采样频率
d=randi([0,1],1, N); %产生[0,1]分布的矩形脉冲
m=d*2-1; %化成双极性序列
a=rectpulse(m, nsamp); %绘制双极性码的矩形信号函数
figure(1);
subplot(311)
plot((1:N*nsamp)/nsamp,a);
title('基带信号');
xlabel('时间(s)');
axis([0,20,-2,2]);
grid on
[pst, f] = periodogram(a,boxcar(length(a)), 2048, nsamp);
subplot(312)
plot(f,pst); %信号的功率谱
pstf_db=10*log10(pst);
xlabel('频率(Hz)');
title('功率谱密度');
axis([0,5,0,15]);
grid on
subplot(313)
plot(f,pstf_db); %化为分贝形式
xlabel('频率(Hz)');
title('功率谱密度(dB)');
axis([0,5,-100,50]);
grid on;
(2)fs=100;
N=20; %生成20个点
nsamp=100; %nsamp:每个矩形脉冲的抽样点数
x=randi([0,1],1, N); %产生[0,1]分布的矩形脉冲
xdouble=x*2-1; %化为双极性序列
m=1; %高电平脉冲信号
figure(1)
subplot(221);
ucf1=rcosflt(m,1,fs,'fir',1);
plot(ucf1);
title('滚降信号时域波形a=1');
grid on;
subplot(222)
ucf2=rcosflt(m,1,fs,'fir',0.75);
plot(ucf2);
title('滚降信号时域波形a=0.75');
grid on;
subplot(223)
ucf3=rcosflt(m,1,fs,'fir',0.5);
plot(ucf3);
title('滚降信号时域波形a=0.5');
grid on;
subplot(224)
ucf4=rcosflt(m,1,fs,'fir',0.25);
plot(ucf4);
title('滚降信号时域波形a=0.25');
grid on;
figure(2)
xdouble_ucf=rcosflt(xdouble,1,fs,'fir',1);
subplot(311);
nsamp=100; %nsamp:每个矩形脉冲的抽样点数
x=randi([0,1],1, N); %产生[0,1]分布的矩形脉冲
xdouble=x*2-1; %化为双极性序列
m=1; %高电平脉冲信号
figure(1)
subplot(221);
ucf1=rcosflt(m,1,fs,'fir',1);
plot(ucf1);
title('滚降信号时域波形a=1');
grid on;
subplot(222)
ucf2=rcosflt(m,1,fs,'fir',0.75);
plot(ucf2);
title('滚降信号时域波形a=0.75');
grid on;
subplot(223)
ucf3=rcosflt(m,1,fs,'fir',0.5);
plot(ucf3);
title('滚降信号时域波形a=0.5');
grid on;
subplot(224)
ucf4=rcosflt(m,1,fs,'fir',0.25);
plot(ucf4);
title('滚降信号时域波形a=0.25');
grid on;
figure(2)
xdouble_ucf=rcosflt(xdouble,1,fs,'fir',1);
subplot(311);
剩余7页未读,继续阅读
资源评论
YQEMMMM
- 粉丝: 123
- 资源: 20
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功