How can we group multiple conditions ???

4 Ansichten (letzte 30 Tage)
Poorna Durga Geesupalli
Poorna Durga Geesupalli am 12 Mai 2022
Kommentiert: prasanth s am 14 Dez. 2022
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 ???

Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by