finding logical index greater than 25

Answers (1)

Guillaume
Guillaume on 22 Feb 2018
Edited: Guillaume on 22 Feb 2018
sequencestarts = [1, find(diff(yourlogicalvector))]; %assuming a row vector
sequencelengths = diff([sequencestarts, numel(yourlogicalvector)+1]);
wantedstarts = sequencestarts(sequencelengths > 25)

This question is closed.

Asked:

on 22 Feb 2018

Closed:

on 22 Feb 2018

Community Treasure Hunt

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

Start Hunting!