Baseband Transmistion with Noise
1 回表示 (過去 30 日間)
古いコメントを表示
I have a project where I am to assume a baseband transmission scheme that sends a stream of binary rectangular pulses of height A = ±1 V (with the positive pulse representing a binary 1 and the negative pulse represents a binary 0).
The transmitted signal will then contain noise, additive noise, which would be introduced.
I am to use use the mean and variance estimators to determine an estimate of the mean and the variance using the generated noise with no signal transmitted.
After I would like to then subtract the estimated mean from the noise process rendering it zero-mean (approximately).
Sounds like a long process and expecially one from someone who never used MatLab before.
I have a few quesions, lets start with if I am on the rihgt track. I am not sure if this is how I should start but below is my initial code:
close all
clc
%%Generation of a signal
%This takes a set of random numbers and converts them to bits 0's & 1's
%The 2*X-1 will create -1's in place of the 0's from the bit conversion.
signal_i = 2*(rand(1,10^5)>0.5)-1;
signal_q = zeros(1,10^5);
%In communication systems we have two channels, Tx and Rx for serial as
%an example. This is why we have singal i and q
scatterplot(signal_i, signal_q);
If considering this code as a good start, I have encountered an error running scatterplot()
This error is as follows:
Operands to the || and && operators must be convertible to logical scalar values.
Error in scatterplot (line 60)
if ((fix(n) ~= n) || (n <= 0))
Error in signalGeneration (line 11)
scatterplot(signal_i, signal_q);
Any thoughts?
0 件のコメント
採用された回答
Walter Roberson
2015 年 7 月 20 日
scatterplot() takes as its second argument an "n" which says to plot every n'th signal.
You might want
scatterplot(signal_i + 1i * signal_q)
2 件のコメント
Walter Roberson
2015 年 7 月 20 日
1i is the imaginary unit, which can also be written as i alone. signal_i + 1i*signal_q makes each signal complex with the real part from signal_i and the imaginary part from signal_q . The documentation for scatterplot() says that when given complex data, it uses the two components for quadrature plot. Which sounded a lot like what you wanted for your *_q signal.
Another way of building the complex signal would have been
scatterplot(complex(signal_i, signal_q))
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Waveform Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!