Visualization of Huffman Encoding Trees

Simple program that builds and visualizes a huffman encoding tree for a user-defined string
4.1K Downloads
Updated 8 May 2008

View License

This program demonstrates how Huffman Encoding works by performing huffman encoding on a user-defined string. The program builds the huffman tree based on user-input and builds a complete huffman tree and code book using built-in MATLAB functions.

A user can edit the string to encode by editing the value of "my_str". The user also has the ability to calculate character probabilities manually or automatically based on ASCII values by changing the "auto_prob" flag and the "prob_dist" variables.

Cite As

Jason Agron (2024). Visualization of Huffman Encoding Trees (https://www.mathworks.com/matlabcentral/fileexchange/19844-visualization-of-huffman-encoding-trees), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!

huffman_encode/html/

Version Published Release Notes
1.0.0.0