Finding indices of array that has a constraint

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?

Réponses (1)

Zikobrelli
Zikobrelli le 17 Juin 2014

0 votes

example:
vector B=[1:10]
Constraint: greater than 5
idx=find(B>5)% will give you the indices satisfying the constraint

Catégories

En savoir plus sur Data Types dans Centre d'aide et File Exchange

Tags

Question posée :

le 17 Juin 2014

Community Treasure Hunt

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

Start Hunting!

Translated by