谁能帮我解决这个问题:
任务是绘制两个图表,显示每种调制方案的 I/Q 分量:BPSK、QPSK、16 QAM 和 MSK,仅用于调制后和添加高斯白噪声后的一个数据集。
所以我想了解如何在调制后和添加噪声后使用 scatterplot() 函数绘制这些分量。
这是与调制和高斯白噪声相关的代码部分:
%******************** BPSK Modulation ***********************
data1=data.*2-1;
data2] = oversamp( data1, nd , IPOINT);
data3 = conv(data2,xh); % conv: built in function
在添加噪音之后:
%************ Add White Gaussian Noise (AWGN) ***************
inoise=randn(1,length(data3)).*attn; % randn: built in function
data4=data3+inoise;
data5=conv(data4,xh2); % conv: built in function
sampl=irfn*IPOINT+1;
data6 = data5(sampl:8:8*nd+sampl-1);
对于 QPSK
%************* QPSK Modulation ********************************
[ich,qch]=qpskmod(data1,1,nd,ml);
[ich1,qch1]= compoversamp(ich,qch,length(ich),IPOINT);
[ich2,qch2]= compconv(ich1,qch1,xh);
%********************* Add White Gaussian Noise (AWGN) **********************
[ich3,qch3]= comb(ich2,qch2,attn);% add white gaussian noise
[ich4,qch4]= compconv(ich3,qch3,xh2);
syncpoint=irfn*IPOINT+1;
ich5=ich4(syncpoint:IPOINT:length(ich4));
qch5=qch4(syncpoint:IPOINT:length(qch4));
对于 MSK
%*************************** MSK Modulation ********************************
[ich,qch]=qpskmod(data1,1,nd/2,2);
smooth1=cos(pi/2*[-1+1./4.*[0:IPOINT-1]]); %IPOINT point filtering
for ii=1:length(ich)
ich2((ii-1)*IPOINT+1:ii*IPOINT)=(-1)^(ii-1)*smooth1.*ich(ii);
qch2((ii-1)*IPOINT+1:ii*IPOINT)=(-1)^(ii-1)*smooth1.*qch(ii);
end
ich21=[ich2 zeros(1,IPOINT/2)];
qch21=[zeros(1,IPOINT/2) qch2];
%********************* Add White Gaussian Noise (AWGN) **********************
[ich3,qch3]= comb(ich21,qch21,attn);% add white gaussian noise
syncpoint=1;
ich5 = ich3(syncpoint+IPOINT/2:IPOINT:length(ich2));
qch5 = qch3(syncpoint+IPOINT:IPOINT:length(ich2)+IPOINT/2);
ich5(2:2:length(ich5))=-1*ich5(2:2:length(ich5));
qch5(2:2:length(ich5))=-1*qch5(2:2:length(ich5));
提前致谢。