huffmandict
Generate Huffman code dictionary for source with known probability model
Syntax
Description
[
generates a binary Huffman code dictionary, dict
,avglen
] = huffmandict(symbols
,prob
)dict
, for the source
symbols, symbols
, by using the maximum variance algorithm. The input
prob
specifies the probability of occurrence for each of the input
symbols. The length of prob
must equal the length of
symbols
. The function also returns average codeword length
avglen
of the dictionary, weighted according to the probabilities in
the input prob
.
Examples
Input Arguments
Output Arguments
References
[1] Sayood, Khalid. Introduction to Data Compression. 2nd ed. San Francisco: Morgan Kaufmann Publishers, 2000.
Version History
Introduced before R2006a