Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

finding logical index greater than 25

1 visualizzazione (ultimi 30 giorni)
Systematically Neural
Systematically Neural il 22 Feb 2018
Chiuso: Stephen23 il 22 Feb 2018
I am looking to find repeats greater than 25 in vector of logical indexing. Does anyone have any suggestions or ideas?

Risposte (1)

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

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by