Usage:  [C,lengths,L,H] = huffman(p)


p is a vector of probabilities 
C is the obtained Huffman code (in a cell array)
L is the expected value of the length of the obtained code
H is the entropy of the source

This function builds a Huffman code from the probablity vector p


Attachments