Finding indices of array that has a constraint
4 次查看(过去 30 天)
显示 更早的评论
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 个)
Zikobrelli
2014-6-17
example:
vector B=[1:10]
Constraint: greater than 5
idx=find(B>5)% will give you the indices satisfying the constraint
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical (Boolean) Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!