フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

search a particular data in a array and return the index of the array that is found

1 回表示 (過去 30 日間)
singh
singh 2015 年 4 月 13 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
my problem is same
if have array which only two columns
X Y
10.2 12.3
21.443 81.31
32.23 43.32 so on
than how to get index value after find the data
suppose i have X value 21.443 and Y value 81.31
how to get the index value 2

回答 (1 件)

Guillaume
Guillaume 2015 年 4 月 13 日
This looks like a duplicate of your other question, this time possibly better explained. The answer is similar, use comparison and logical operations, together with find:
nodes = [10.2 12.3
21.443 81.31
32.23 43.31];
x = 21.443;
y = 43.32;
noderow = find(nodes(:, 2) == x & nodes(:, 3) == y)

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by