compress.m

Compress matrices by creating MATLAB code.
2.9K Downloads
Updated 11 Apr 2002

No License

Run length compression of a vector or matrix by creating a string of MATLAB evaluable code! Could thus also be called 'data2mcode' or something like that. This function replaces streams of same numbers with MATLAB code and returns a string which can be evaluated! Really funny way to save memory or transform i.e. pictures to MATLAB executable code. I used it to make a Simulink block icon without the need of a file on the disk.

(See the Simulink model in the ddfread.m on MatlabCentral)

Cite As

Berthold Kaeferstein (2024). compress.m (https://www.mathworks.com/matlabcentral/fileexchange/1592-compress-m), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R11.1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Software Development Tools in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0