|
Post by malokolo on Nov 4, 2008 8:59:23 GMT -5
hi all can any one show me how to do bpsk modulation in matlab. i am novice to matlab. thanks before hand
|
|
|
Post by mafzal on Nov 17, 2008 0:57:30 GMT -5
map input samples to +/-1
|
|
|
Post by aya2002 on Feb 26, 2009 9:48:59 GMT -5
run this code clc; clear all; disp('M-Array PSK Modulation') %create a random digital message M=input ('M= '); %alphabet size x=randint(input('Number of binary bit stream = '),1,M); %% nsample=40; %oversampling rate. %use M-PSK modulation to produce y y=modulate(modem.pskmod(M),x); %% %follow with rectangular pulse shaping. ypulse=rectpulse(y,nsample); stem(y(1:10),'filled'),grid; %% %%transmit signal through an AWGN Channel ynoisy=awgn(ypulse,input('SNR in dB = '),'measured'); %% %Create scattet plot from noisy data scatterplot(ynoisy),grid; %% %Downsample at the reciever. ydownsample=intdump(ynoisy,nsample); %% %Demodulate ynoisy to recover the message. z=demodulate(modem.pskdemod(M),ydownsample); figure; subplot(2,1,1); stem(x(1:10),'filled'),grid; subplot(2,1,2); stem(z(1:10),'filled'),grid; %% %Check symbole erroe rate. [num ty]=symerr(x,z) enjoy
|
|