om mustafa
om mustafa

Reputation: 13

matlab - graph plotting

I have two arrays to plot, in x axis : array a. In y axis array b (ones and zeros)

I want to plot vertical lines when the values of array b =1 i.e

a=[23 12 76 43 21 90]
b=[1 0 1 1 0 1]

Upvotes: 0

Views: 233

Answers (1)

zellus
zellus

Reputation: 9592

You may try bar plot.

a=[23 12 76 43 21 90];
b=[1 0 1 1 0 1];
bar(a,b)

bar plot

Upvotes: 2

Related Questions