Huffman coding with frequencies

2 次查看(过去 30 天)
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

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Denoising and Compression 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by