全文预览

基于Matlab的QPSK调制与解调系统仿真—数字通信课程设计

上传者:qnrdwb |  格式:doc  |  页数:19 |  大小:216KB

文档介绍
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%调制部分%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%基带信号的产生data=randn(1,nb)>0.5;%调用一个随机函数(0or1),datanrz=data.*2-1;%变成极性码data1=zeros(1,nb/delta_T);forq=1:nbdata1((q-1)/delta_T+1:q/delta_T)=datanrz(q);%将极性码变成对应的波形信号end%将基带信号变换成对应波形信号data0=zeros(1,nb/delta_T);%创建一个1*nb/delta_T的零矩阵forq=1:nbdata0((q-1)/delta_T+1:q/delta_T)=data(q);%将非极性码变成对应的波形信号endfigure(1);subplot(2,1,1)plot(data0),title('波形信号(非极性)');axis([0,1000,0,1.5]);subplot(2,1,2)plot(data1),title('波形信号(极性)');axis([0,1000,-1.5,1.5]);%串并转换,将奇偶位数据分开idata=datanrz(1:space:(nb-1));%将奇偶位分开qdata=datanrz(2:space:nb);%QPSK信号的调制ich=zeros(1,nb/delta_T/2);%创建一个1*nb/delta_T/2的零矩阵,以便后面存放奇偶位数据fori=1:nb/2ich((i-1)/delta_T+1:i/delta_T)=idata(i);end

收藏

分享

举报
下载此文档