Matlab 2009a code to plot message bits as rectangular pulse

조회 수: 2 (최근 30일)
Oj.Williams
Oj.Williams 2011년 6월 24일
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.

답변 (1개)

Walter Roberson
Walter Roberson 2011년 6월 24일
Consider using stairs()
  댓글 수: 2
Paulo Silva
Paulo Silva 2011년 6월 24일
n=100;
a=randi([0 1],n,1)
stairs(0:n-1,a)
axis([0 n 0 2])
Oj.Williams
Oj.Williams 2011년 6월 26일
Thanks so much, its just the code i need for a start.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Hilbert and Walsh-Hadamard Transforms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by