Huffman coding with frequencies

3 views (last 30 days)
hey everyone , i am new to matlab and i want to implement huffman coding algorithm in which input will be symbols and frequencies , also frequencies must not be between 0-1 ,can be any positive integer. I found some functions like
[dist avgvalue] = huffmandict(symbols,p);
but it takes only probability vector that must be 0 to 1 also the sum of all probabilities should be 1 here, but in my case p can be any positive integer. example:
symbol frequencies
1 3
2 9
11 10
0 0
and so on
please provide some help thanks in advance

Accepted Answer

Walter Roberson
Walter Roberson on 5 Apr 2014
the experimental probability for any given symbol is the frequency for it divided by the total of the frequencies.

More Answers (0)

Categories

Find more on Denoising and Compression in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!