Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

finding logical index greater than 25

1 Ansicht (letzte 30 Tage)
Systematically Neural
Systematically Neural am 22 Feb. 2018
Geschlossen: Stephen23 am 22 Feb. 2018
I am looking to find repeats greater than 25 in vector of logical indexing. Does anyone have any suggestions or ideas?

Antworten (1)

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

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by