How to Plotting a Binary input?

%Input signal
clc;
clear all;
d = input('Enter Decimal Input to convert to Binary : ');
byte = dec2bin(d)
%Plotting Input signal
stairs(byte)
I am having to trouble plotting the binary number can anyone help me. It would be appreciated. Thank you,

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 12 月 1 日
編集済み: Azzi Abdelmalek 2014 年 12 月 1 日

0 投票

d = 89
byte = dec2bin(d)
%Plotting Input signal
stairs(byte-'0','r','linewidth',5)

カテゴリ

質問済み:

2014 年 12 月 1 日

編集済み:

2014 年 12 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by