You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
[l,s] = runlength(x,R) parses the vector x into 'runs' of constant value.
x - row or column vector
R - maximum run length
l - length of run
s - value of run
Eg. x = [0 0 0 pi pi -1 -1 7 7 7 7 nan inf inf -inf];
R = 3;
l = [ 3 2 2 3 1 1 2 1 ];
s = [ 0 3.14 -1 7 7 nan inf -inf ];
Output vectors have the same orientation as the input vector.
Cite As
Owen Kelly (2026). runlength.m (https://www.mathworks.com/matlabcentral/fileexchange/241-runlength-m), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0.0 (1.1 KB)
-
No License
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 |
