Find a raw position referred to a value in a matrix

1 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by