This is an implementation of Huffman code. Content:
%NORM2HUFF Huffman codification (encoder)
%HUFF2NORM Huffman codification (decoder)
%HUFFCODES2BIN Convert huffcodes to binary representation
Max codeword length is 51 bits.
thanks very much
It works perfectly but only for unsigned data. good work done Thanks
ru guys sure if a Matlab program works out a Huffman code for this source.
please help me.....
can u send d file as m file or text...
please help me
It's great nice job Giuseppe! thank you so mutch...
involve basic programming also...
have a look
i like matlab codes
I ask for the huffman encode/decode.
I am student of communication engineering
therefore I am taking acourse on coding theory so let's cooperate.
i want huffman code , because i have some project by it please send it to me in my e-mail if that possible . thank's
Works great. Thanks!
It worked perfectly and fast enough for me. The comment 'worst code i ever saw' is a discouraging comment for this submission! I was hesitating for downloading it, but then I gave it a go and it was a perfect solution. Thanks.
worst code i ever saw
if you change the following lines of the code this is probably one of the fastest huffman codes for matlab:
--- norm2huff.m ---
%f = frequency(vector);
% frequency function is obsolete
% hist function is much, much faster!!!
f = hist( double( vector(:) ), 0:65535 );
f = f/sum(f);
Note: I also updated the script to handle uint16 instead of uint8; so for uint8 maybe try the following hist function: ...hist(...,0:255)
New function added: huffcodes2bin.m