Filter löschen
Filter löschen

How can i choose one result of numerical result?

1 Ansicht (letzte 30 Tage)
Light
Light am 7 Jun. 2013
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
  2 Kommentare
Azzi Abdelmalek
Azzi Abdelmalek am 7 Jun. 2013
What is the expected result?
Light
Light am 7 Jun. 2013
Expected result is 3. But if it is hard, just choose one result of them is enough.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 7 Jun. 2013

Weitere Antworten (1)

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

Kategorien

Mehr zu Troubleshooting in Polyspace Products for Ada finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by