mankeer said:
use
qpskmod and qpskdemod functions from matlab communication toolbox.
Regards
yes i agree with you, for example see this code copied from the matlab help:
This code briefly illustrates the steps in modulation and demodulation.
x = randint(10,1,8); % Create a signal source.
h = modem.qammod(8) % Create a modulator object
% and display its properties.
y = modulate(h,x); % Modulate the signal x.
g = modem.qamdemod(h) % Create a demodulator object
% from a modem.qammod object
% and display its properties.
z = demodulate(g,y); % Demodulate the signal y.
and this another code from matlab help:
nSamp = 8; numSymb = 100;
M = 4; SNR = 14;
hStr = RandStream('mt19937ar', 'Seed', 12345);
numPlot = 10;
msg_orig = randi(hStr, [0 M-1], numSymb, 1);
stem(0:numPlot-1, msg_orig(1:numPlot), 'bx');
xlabel('Time'); ylabel('Amplitude');
hMod = modem.pskmod('M', M, 'PhaseOffset', pi/4, 'SymbolOrder', 'Gray');
msg_tx = modulate(hMod, msg_orig);
msg_tx = rectpulse(msg_tx,nSamp);
h1 = scatterplot(msg_tx);
msg_rx = awgn(msg_tx, SNR, 'measured', hStr, 'dB');
h2 = scatterplot(msg_rx);
hDemod = modem.pskdemod('M', M, 'PhaseOffset', pi/4, 'SymbolOrder', 'Gray');
close(h1(ishghandle(h1)), h2(ishghandle(h2)));
msg_rx_down = intdump(msg_rx,nSamp);
msg_demod = demodulate(hDemod, msg_rx_down);
stem(0:numPlot-1, msg_orig(1:numPlot), 'bx'); hold on;
stem(0:numPlot-1, msg_demod(1:numPlot), 'ro'); hold off;
axis([ 0 numPlot -0.2 3.2]); xlabel('Time'); ylabel('Amplitude');
[errorBit ratioBit] = biterr(msg_orig, msg_demod, log2(M));
[errorSym ratioSym] = symerr(msg_orig, msg_demod);
it is very simple, just use the matlab help and you will find every thing ready to use.
regards