How can i choose one result of numerical result?

1 次查看(过去 30 天)
I have to choose higher row number (only one result)
A=[-1,1,1;0,-1,0;0,0,-1;1,0,0];
blnA = logical( A == -1 );
blnOut = find(all(ismember(A,[0,-1]),2));
blnOut =
2
3

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-6-7

更多回答(1 个)

Iain
Iain 2013-6-7
bInOut(end)
Swap end for something else if you want a different result, like 1 for the minimum, or 2 for the 2nd, etc.

类别

Help CenterFile Exchange 中查找有关 Troubleshooting in Polyspace Products for Ada 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by