Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

finding logical index greater than 25

1 visualización (últimos 30 días)
Systematically Neural
Systematically Neural el 22 de Feb. de 2018
Cerrada: Stephen23 el 22 de Feb. de 2018
I am looking to find repeats greater than 25 in vector of logical indexing. Does anyone have any suggestions or ideas?

Respuestas (1)

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

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by