Finding indices of array that has a constraint

3 ビュー (過去 30 日間)
Rick
Rick 2014 年 6 月 17 日
回答済み: Zikobrelli 2014 年 6 月 17 日
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 件のコメント
Andrei Bobrov
Andrei Bobrov 2014 年 6 月 17 日
Your example... please.

サインインしてコメントする。

回答 (1 件)

Zikobrelli
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

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by