FINDSEQ (Scripts) Publisher's description
from Oleg Komarov
Find sequences of repeated (adjacent/consecutive) numeric values
Find sequences of repeated (adjacent/consecutive) numeric values. Finds sequences of NaNs and Infs too.
(1) FINDSEQ(A) Find sequences of repeated numeric values in A along the first non-singleton dimension. A shuld be a numeric nD matrix.
(2) FINDSEQ(A,DIM) Look for sequences along the dimension specified by the positive integer scalar DIM.
OUT = findseq(...)
OUT is a "m by 4" numeric matrix where m is the number of sequences found.
Each sequence has 4 columns where:
- 1st col.: the value being repeated
- 2nd col.: the position of the first value of the sequence
- 3rd col.: the position of the last value of the sequence
- 4th col.: the length of the sequence
[VALUES, INPOS, FIPOS, LEN] = findseq(...)
Get OUT as separate outputs.
For details see help
For examples see the attached image.
Comments/suggestions/error reports are welcome.
System Requirements:MATLAB 7.9 (2009b)
Program Release Status: New Release
Program Install Support: Install and Uninstall