Info

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

How can I script this ?

1 view (last 30 days)
Aniruddha Das
Aniruddha Das on 21 Apr 2020
Closed: MATLAB Answer Bot on 20 Aug 2021
Lets say, there are two row vectors A and B.
For each element of A, there is a value assigned in B.
for example,
A = [ 10 19 5 9 14 18 20 7]
B= [ 20.2 26 23.6 27.8 25 31 34.9 40]
I want to select only those elements of A which are > 10 and also want to get the correspnding numbers from B.
Help me with this.
Thanks

Answers (1)

Adam Danz
Adam Danz on 21 Apr 2020
Hint:
A>10
B(A>10)
  2 Comments
Adam Danz
Adam Danz on 21 Apr 2020
Glad I could help!

Community Treasure Hunt

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

Start Hunting!

Translated by