given two matrices find the indices of B in A

1 回表示 (過去 30 日間)
Sparsh Garg
Sparsh Garg 2021 年 7 月 27 日
編集済み: KSSV 2021 年 7 月 27 日
To be clear,say A is a 2x76 matrix and B is a 2x29 matrix,for all values in B I need to find out the indices of where these values are in A,
for example in B the first column value is "47.9833;32" ,this is located in A at indice 45,similarly in B there are two values of 50,located in A at indice 59 and 67.
Side note A contains NAN values also.
I have tried running the answer suggested by Madhan ravi in this thread,but when I execute the suggested solution cell(numel(CRE,1)) gives a null structure which later on causes the "index exceeds matrix dimension error" to be raised.
Any help will be appeciated.

回答 (1 件)

KSSV
KSSV 2021 年 7 月 27 日
編集済み: KSSV 2021 年 7 月 27 日
Read about ismember, in there you can specify the option of rows.

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by