0

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]

1 Answer 1

2

You may try bar plot.

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

bar plot

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.