calc_lz_complexity
Calculates the Lempel-Ziv complexity of binary sequence - a measure of its "randomness"
You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Cite As
Quang Thai (2026). calc_lz_complexity (https://ch.mathworks.com/matlabcentral/fileexchange/38211-calc_lz_complexity), MATLAB Central File Exchange. Retrieved .
Categories
Find more on Simulation, Tuning, Visualization, and MIDI in Help Center and MATLAB Answers
General Information
- Version 1.9.0 (6.29 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.9.0 | Corrected normalisation for the 'primitive' complexity type calculation. It will give a slightly different number to before, but this new result is actually what was intended. |
||
| 1.8.0 | Fixed a calculation that was needed for the 'normalize' option when using newer versions of MATLAB, due to MATLAB changing one of the return values from the unique() function from a row to a column vector. Retested on MATLAB 2017b. |
||
| 1.7.0 | The eigenfunction that corresponds with the input sequence, and calculated internally, can now be obtained by the caller of calc_lz_complexity() as a return value. |
||
| 1.4.0 | Another optimisation tweak that should result in this implementation running faster again for most sequences than the previous version. |
||
| 1.3.0 | Major speed improvement. The old version was actually very inefficient and slow. A rethink of the eigenfunction calculation was warranted. On my PC, this new version runs about 140x faster than the previous version!!! |
||
| 1.2.0 | Changed the way normalized complexity was calculated. It is now normalized against (n/log2(n)), rather than n, where n is the length of the sequence. Upon reviewing Lempel-Ziv's paper, this normalization seems to make more sense. |
||
| 1.1.0 | Forgot to include a helper function that's used by the main calc_lz_complexity() function. |
||
| 1.0.0 |