generate signal in matlab
Matlab Help:
The example generates a random digital signal, modulates it, and adds noise. Then it creates a scatter plot, demodulates the noisy signal, and computes the symbol error rate. For a more elaborate example that is similar to this one, see Modulating a Random Signal.
% Create a random digital message
M = 16; % Alphabet size
x = randint(5000,1,M);
% Use 16-QAM modulation to produce y.
y=modulate(modem.qammod(M),x);
% Transmit signal through an AWGN channel.
ynoisy = awgn(y,15,'measured');
% Create scatter plot from noisy data.
scatterplot(ynoisy);
% Demodulate ynoisy to recover the message.
z=demodulate(modem.qamdemod(M),ynoisy);
% Check symbol error rate.
[num,rt]= symerr(x,z)
The output and scatter plot follow. Your numerical results and plot might vary, because the example uses random numbers.
num =
83
rt =
0.0166
The scatter plot does not look exactly like a signal constellation. Where the signal constellation has 16 precisely located points, the noise causes the scatter plot to have a small cluster of points approximately where each constellation point would be.
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
**broken link removed**
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
Added after 2 minutes:
by the way, I am agree with konarkk