How to find a value of a vector from another one?

조회 수: 1 (최근 30일)
Amin Ganjavi
Amin Ganjavi 2015년 11월 25일
댓글: Amin Ganjavi 2015년 11월 25일
There are two (A&B) vectors with N samples each. Each number of A has a specific value in B.
I have a value in A (a number among N samples), and interested to find it in B. For example:
A=[250 400 300 200 100 ...]
B=[5 6 1 2 9 ...]
I want to find B when A =200, the answer is B=2 (in this case).
Thanks

채택된 답변

Ingrid
Ingrid 2015년 11월 25일
is this what you mean?
B(A==200)
  댓글 수: 1
Amin Ganjavi
Amin Ganjavi 2015년 11월 25일
I thought it is much more complex and need to use arrayfun.
Thank you

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by