How do I plot a bitstream of [1,0,1,0] on Matlab?
이전 댓글 표시
I dont want to plot random bits but thats all i seem to find on the net.
채택된 답변
추가 답변 (2개)
Oleg Komarov
2011년 2월 12일
1 개 추천
Other two options:
%Create a a = randi([0,1],1,100)
First option
spy(a)
Second option
scatter(1:numel(a),a,'s','MarkerEdgeColor','w','MarkerFaceColor','k') set(gca,'YTick',[0 1],'ylim',[-0.5 1.5])

Oleg
댓글 수: 1
mohammed AL-Mayali
2021년 7월 3일
Thank you, sir... The first option is very useful
Henry
2015년 7월 16일
bitstream = randi(2,50,1)-1; % create random stream of zeros and ones (binary)
stairs(bitstream); % This makes the bitstream visible
ylim([-5 5]); % Add some clearance above and below
카테고리
도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!