数字基带信号的码型

更新时间:2023-05-31 22:22:01 阅读量: 实用文档 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

不错的提示

课程名称: 通信原理实验 实验名称: 数字基带信号的码型 专 学 姓 业: 网络工程 号:

090208240

名: 徐丹丹 九章楼

实验地点: 实验日期: 常 熟

2010.12.17 理 工 学 院

不错的提示

实 验 目 的 和 要 求 实 装有 MATLAB 的计算机 验 器 材

实 验 原 理 和 方 法 实 验 数 据 和 结 果

1.Snrz: function y=snrz(x) t0=300; t=0:1/t0:length(x); for i=1:length(x) if(x(i)==1) for j=1:t0 y((i-1)*t0+j)=1; end else for j=1:t0 y((i-1)*t0+j)=0; end end end y=[y,x(i)]; M=max(y); m=min(y); subplot(2,1,1)

不错的提示

plot(t,y);grid on; axis([0,i,m-0.1,M+0.1]); title('1 0 0 1 1 0 0 0 0 1 0 1'); t=[1 0 0 1 1 0 0 0 0 1 0 1]; snrz(t);

2.srz function y=srz(x) t0=200; t=0:1/t0:length(x); for i=1:length(x) if(x(i)==1) for j=1:t0/2 y(t0/2*(2*i-2)+j)=1; y(t0/2*(2*i-1)+j)=0; end else for j=1:t0/2 y(t0*(i-1)+j)=0; end end end y=[y,x(i)]; M=max(y); m=min(y); subplot(211) plot(t,y);grid on; axis([0,i,m-0.1,M+0.1]); title('1 0 0 1 1 0 0 0 0 1 0 1'); t=[1 0 0 1 1 0 0 0 0 1 0 1]; srz(t);

不错的提示

3.dnrz function y=dnrz(x) t0=300; t=0:1/t0:length(x); for i=1:length(x) if(x(i)==1) for j=1:t0 y((i-1)*t0+j)=1; end else for j=1:t0 y((i-1)*t0+j)=-1; end end end y=[y,x(i)]; M=max(y); m=min(y); subplot(2,1,1) plot(t,y);grid on; axis([0,i,m-0.1,M+0.1]); title('1 0 0 1 1 0 0 0 0 1 0 1'); t=[1 0 0 1 1 0 0 0 0 1 0 1]; dnrz(t);

不错的提示

4.drz function y=drz(x) t0=300; t=0:1/t0:length(x); for i=1:length(x) if(x(i)==1) for j=1:t0/2 y(t0/2*(2*i-2)+j)=1; y(t0/2*(2*i-1)+j)=0; end else for j=1:t0/2 y(t0/2*(2*i-2)+j)=-1; y(t0/2*(2*i-1)+j)=0; end end end y=[y,x(i)]; M=max(y); m=min(y); subplot(211) plot(t,y);grid on; axis([0,i,m-0.1,M+0.1]); title('1 0 0 1 1 0 0 0 0 1 0 1'); t=[1 0 0 1 1 0 0 0 0 1 0 1]; drz(t);

5.machester function y=machester(x) t0=300; t=0:1/t0:length(x); for i=1:length(x) if(x(i)==1) for j=1:t0/2 y(t0/2*(2*i-2)+j)=1;

不错的提示

y(t0/2*(2*i-1)+j)=0; end else for j=1:t0/2 y(t0/2*(2*i-2)+j)=1; y(t0/2*(2*i-1)+j)=0; end end end y=[y,x(i)]; M=max(y); m=min(y); subplot(211) plot(t,y);grid on; axis([0,i,m-0.1,M+0.1]); title('1 0 0 1 1 0 0 0 0 1 0 1'); t=[1 0 0 1 1 0 0 0 0 1 0 1]; machester(t);

6.dmachester function y=dmachester(x) t0=100; t=0:1/t0:length(x); i=1; if(x(i)==1) for j=1:t0/2 y(t0/2*(2*i-2)+j)=0; y(t0/2*(2*i-1)+j)=1; end else for j=1:t0/2 y(t0/2*(2*i-2)+j)=1; y(t0/2*(2*i-1)+j)=0; end end

不错的提示

for i=2:length(x) if(x(i)==1) for j=1:t0/2 y(t0/2*(2*i-2)+j)=y(t0/2*(2*i-3)+t0/4); y(t0/2*(2*i-1)+j)=1-y(t0/2*(2*i-2)+j); end else for j=1:t0/2 y(t0/2*(2*i-2)+j)=1-y(t0/2*(2*i-3)+t0/4); y(t0/2*(2*i-1)+j)=1-y(t0/2*(2*i-2)+j); end end end y=[y,y(i*t0)]; M=max(y); m=min(y); subplot(211) plot(t,y); axis([0,i,m-0.1,M+0.1]); set(gca,'Xtick',[0:1:12],'Ytick',[0,1]) grid on title('1 0 0 1 1 0 0 0 0 1 0 1'); t=[1 0 0 1 1 0 0 0 0 1 0 1]; dmachester(t);

评 语 及 成 绩 教师 (签署) 签署)学号姓名.rar”的方式上传,如”09020700 张三 的方式上传, 张三.rar”,内须含报告和代码 注:上传时请按”

学号姓名 上传时请按 学号姓名 的方式上传 ,内须含报告和代码

本文来源:https://www.bwwdw.com/article/jmy1.html

Top