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 Center および File ExchangeMultidimensional Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by