How can we group multiple conditions ???

조회 수: 5 (최근 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 CenterFile Exchange에서 FPGA, ASIC, and SoC Development에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by