I'm New to Matlab & Simulink
but i Made many communication Systems last year
but i always have problem when i try to make Binary Data Source
i used the (Bernoulli Binary Generator) but its no use cause there is no data rate (the output Data rate (Rb))
and the FFT of the O/P is Not Sinc Square Function as if you see the O/P of it in vector scope you can tell that its not Rect Pulses.
So i made one with my self by (Embedded MATLAB Function) and here the code
function z = fcn()
x = rand ();
y = round (x);
w = y*1;
z = 2*(w-0.5);
%the O/P is Random Data NRZ Code (-1,1)
but the problem is the same the O/P is Still Continuous and there no data rate specified
so what i can do to make it?
All I Want is Binary Data Source (Pure Random Rect Pulses) With :-
1- Discrete Domain
2- That Data Rate Or Frequency Specified (And if how to calculate it)
Please Help Me On This Problem.
Thanks In Advance
I.G
Ts = 1/Rb
where Ts (in seconds per sample) is the sample time and Rb is the data rate
(in bits per second).
So all you need to do is enter 1/Rb in the field for the Sample Time.
HTH.
Rick
"Islam Galal" <islam_g...@yahoo.com> wrote in message
news:ig815o$789$1...@fred.mathworks.com...
but as i said that will not give you a correct O/P
Here is what i Mean
Uploaded with [URL=http://imageshack.us]ImageShack.us[/URL]
the spectrum is not Sinc^2
or the Time Signal Is Rect Pulses (Some of them is Triangle so is that Binary)
Thanks in advance
I.G
"Islam Galal" wrote in message <ig815o$789$1...@fred.mathworks.com>...
Incidentally, the only "correct" way to plot it is as a stem-and-leaf plot,
which shows the signal as it actually is.
You can also take the FFT of the signal, but again, this will only give you
the spectrum of a single instance of the random process. The correct way to
view the spectrum is to compute the auto-correlation of the random process,
and then take the FFT, which will give you the Power Spectral Density.
Since each sample is by definition independent of all of the other samples,
the autocorrelation is simply the discrete-time unit impulse function, and
the PSD is therefore constant across all frequencies.
HTH.
Best,
Rick
"Islam Galal" <islam_g...@yahoo.com> wrote in message
news:ig8csp$9m4$1...@fred.mathworks.com...