MATLAB画出二进制比特流信号,QPSK信号Matlab生成代码

利用Matlab生成QPSK信号,经过RRC滤波器脉冲成型,并转化诚信好源可以播放的波形文件

rolloff = 0.25; % Rolloff factor

cutoffFreq = 1/(2*Tsym); % Cutoff frequency (half Nyquist bandwidth)

%cutoffFreq为信号带宽的一半,也就是符号速率的一半,符号速率决定信号带宽

orderFilt = nSymFilt*nsamp; % Filter order (number of taps - 1)

% Filter responses and structures

sqrtrcCoeff = firrcos(orderFilt, cutoffFreq, rolloff, 1/Tsamp, 'rolloff', 'sqrt');

%%up sampling

trans_I=upsample(real(modulate),nsamp); %先要对原始调制的IQ数据进行过采样倍数的内插 trans_Q=upsample(imag(modulate),nsamp);

%%filter data

trans_I = filter(sqrtrcCoeff,1,trans_I);

trans_Q = filter(sqrtrcCoeff,1,trans_Q);

trans=trans_I+j*trans_Q;

% *************************************************************************

%需要I和Q值以及采样速率,由用户自己提供

% *************************************************************************

status = 1;

InstrTargetPath = 'C:\'; % MS Windows based, e.g. SMU, SMJ, SMATE, AFQ

StartARB = 0; % start in path A

KeepLocalFile = 1; % waveform local saved

LocalFileName = 'case.wv'; % The local and remote file name

InstrObject= 0;%不传给仪表

Fsample=1/Tsamp;%如果没有Clock变量可以直接在这里赋值

IQInfo.I_data = trans_I;

IQInfo.Q_data = trans_Q;

http://doc.docsou.comment = 'my signal'; % optional comment

IQInfo.copyright = 'Rohde&Schwarz'; % optional copyright

IQInfo.clock = Fsample; % sample rate

IQInfo.no_scaling = 0;

% scale level,如果IQ原始数据不在+1和-1之间需要这样,0表示要scaling,1表示不需要scaling IQInfo.path = InstrTargetPath; % location on instrument

IQInfo.filename = LocalFileName; % local and remote file name

IQInfo.markerlist.one = [[0 1];[1 0]]; % marker signal 1

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值