Matlab 2009a code to plot message bits as rectangular pulse

2 visualizaciones (últimos 30 días)
Oj.Williams
Oj.Williams el 24 de Jun. de 2011
I don't know matlab, just started reading the tutorial, but i need it for my final year project. My question is: i need a matlab code to generate random message bits and plot the waveform of the message as rectangular pulse. your assistance would be valued.

Respuestas (1)

Walter Roberson
Walter Roberson el 24 de Jun. de 2011
Consider using stairs()
  2 comentarios
Paulo Silva
Paulo Silva el 24 de Jun. de 2011
n=100;
a=randi([0 1],n,1)
stairs(0:n-1,a)
axis([0 n 0 2])
Oj.Williams
Oj.Williams el 26 de Jun. de 2011
Thanks so much, its just the code i need for a start.

Iniciar sesión para comentar.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by