Info

此问题已关闭。 请重新打开它进行编辑或回答。

finding logical index greater than 25

1 次查看(过去 30 天)
Systematically Neural
关闭: Stephen23 2018-2-22
I am looking to find repeats greater than 25 in vector of logical indexing. Does anyone have any suggestions or ideas?

回答(1 个)

Guillaume
Guillaume 2018-2-22
编辑:Guillaume 2018-2-22
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