Finding the number of consecutive points in a given vector, using a condition
Show older comments
suppose i have a vector A=[0.2, 0.3, 4,5,6,7,0.2,0.4,0.5,0.3];
I have to find all those points which are less than 1, and occur consecutively more than 3 times.
ie. for the given vector A, i would get [0.2,0.4,0.5,0.3]
kindly help me write a general code for say, A being n x 1 vector, find all those points which are less than x, and occur consecutively more than y times.
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!