Find a raw position referred to a value in a matrix

1 回表示 (過去 30 日間)
luca
luca 2019 年 9 月 10 日
回答済み: Adam Danz 2019 年 9 月 10 日
Hi given the following matrix
A = [110 220 330 440 550 660 770 880 990 1100;
220 330 440 550 660 770 880 990 1100 1210;
330 440 550 660 770 886 996 1106 1216 1326;
440 550 660 770 880 1002 1112 1222 1332 1442;
550 660 770 880 990 1112 1222 1332 1442 1552;
660 770 880 990 1100 1228 1338 1448 1558 1668;
770 880 990 1100 1210 1344 1454 1564 1674 1784;
880 990 1100 1210 1320 1460 1570 1680 1790 1900;
990 1100 1210 1320 1430 1576 1686 1796 1906 2016;
1100 1210 1320 1430 1540 1692 1802 1912 2022 2132;
1210 1320 1430 1540 1650 1808 1918 2028 2138 2248;
1320 1430 1540 1650 1760 1918 2028 2138 2248 2358;
1430 1540 1650 1760 1870 2028 2138 2248 2358 2468]
I would like to find the FIRST raw where we exceed the value 2000. In this case is the 9th raw
May someone can help me?

採用された回答

Adam Danz
Adam Danz 2019 年 9 月 10 日
rowNum = find(any(A > 2000,2),1,'first');

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by