How can we group multiple conditions ???

4 ビュー (過去 30 日間)
Poorna Durga Geesupalli
Poorna Durga Geesupalli 2022 年 5 月 12 日
コメント済み: prasanth s 2022 年 12 月 14 日
For example X=[-1.19 -0.94 -0.78 -0.47 -0.28 -0.22 1.05 1.23 0.78 1.55 1.45 1.00];
From this data I have grouped the values which is >=1 and <=-0.5.
Now I would like to group these two criterias besides a new criteria.
Like wise: Condition 1: I have to get a group where the values <=-0.5 values are more than 3 or= consecutive
Condition 2: Group the cells which values are >=1 more than or = 3 consecutive cells
Condition 3: Group the cells which satisfies the above two criteria in between them.
Answers for each condition:
Condition1: GrpA=[-1.19 -0.94 -0.78]
Condition 2: GrpB=[1.55 1.45 1.00];
Condition 3: GrpC=[ -0.47 -0.28 -0.22 1.05 1.23 0.78];
I want my answer like this :
Tirads =[GrpA GrpC GrpB];
Triadlength=[3 6 3];
Now my function has to pick the above Triads
Can we do this ???

回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by