Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

finding logical index greater than 25

1 vue (au cours des 30 derniers jours)
Systematically Neural
Systematically Neural le 22 Fév 2018
Clôturé : Stephen23 le 22 Fév 2018
I am looking to find repeats greater than 25 in vector of logical indexing. Does anyone have any suggestions or ideas?

Réponses (1)

Guillaume
Guillaume le 22 Fév 2018
Modifié(e) : Guillaume le 22 Fév 2018
sequencestarts = [1, find(diff(yourlogicalvector))]; %assuming a row vector
sequencelengths = diff([sequencestarts, numel(yourlogicalvector)+1]);
wantedstarts = sequencestarts(sequencelengths > 25)

Community Treasure Hunt

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

Start Hunting!

Translated by