Info

This question is closed. Reopen it to edit or answer.

Sort vector A depending on vector B.

1 view (last 30 days)
Priya Patel
Priya Patel on 25 Oct 2015
Closed: MATLAB Answer Bot on 20 Aug 2021
I have two vectors that correspond to each other. Vector A are all temperatures. Vector B consists only of ones, twos and zeros. I only want to plot the vector A values that have a vector B value of zero. How can I do this?

Answers (1)

the cyclist
the cyclist on 25 Oct 2015
plot(A(B==0))
  1 Comment
Priya Patel
Priya Patel on 25 Oct 2015
Hi, what if they were imported as two separate vectors in my code?

Tags

Community Treasure Hunt

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

Start Hunting!