Finding indices of array that has a constraint
Ältere Kommentare anzeigen
Hello
I have an array with a set of constraints imposed, and I want to know the single indices of all elements that meet the constraints. How can I go about doing that?
1 Kommentar
Andrei Bobrov
am 17 Jun. 2014
Your example... please.
Antworten (1)
Zikobrelli
am 17 Jun. 2014
0 Stimmen
example:
vector B=[1:10]
Constraint: greater than 5
idx=find(B>5)% will give you the indices satisfying the constraint
Kategorien
Mehr zu Elementary Math finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!