QPSK :: Homework solution, help required

Status
Not open for further replies.

samoofcuk

Junior Member level 1
Junior Member level 1
Joined
Nov 6, 2009
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
cairo
Activity points
1,382
qpsk

hello,
i really want a matlab code that make quadrature phase shift keying, in this code i want each two bits represent a symbol and each code line explained in details because this my last communication project...i hope that any one can help me
 

PLZ I REALLY DONT KNOW HOW TO MAKE IT????

Added after 2 hours 11 minutes:

really this is not home work i m in my bachelor year this is a presentation to how can u present code in matlab help is open ..open book all things is available but u have to explain each line in matlab so i told u i want the code with explain of each line so plz if u have this code can u send for me
 

use

qpskmod and qpskdemod functions from matlab communication toolbox.

Regards
 

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
 

    samoofcuk

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads