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!