• huffman in matlab
    1 replies, posted
Hi! For homework we must make Huffman algorithm which can encode any given ASCII text file. While in other programming languages, like Java, I wouldn't have so much trouble, MatLab really gives me a headache (partially because we started learning it this year while I knew Java from years back). I don't even have any clue on how to store the characters, in Java I would use TreeMap and take the character as key and number of appearances as value to later calculate the probabilities. But I need some help on what to use here? Any suggestions please? I have to do this until friday so there isnt much time :S Thank you!!!
Allright, I got the encoded text now but I have to write it back into file in packets of 8 bits. Could anyone suggest me how to do that in C? (Ill read bits from matrix and write them into a file, togethher they will from a letter.) Thanks!
Sorry, you need to Log In to post a reply to this thread.