Menu

[Solved] Get Help Don T Know Code Supposed Look Like Part Q37249998

Can I get some help? I don’t know what the code is supposed tolook like for this partTask: PART 1: In this exercise, Huffman coding will be applied to compress a text file. The program steps are as follows: The.

Task: PART 1: In this exercise, Huffman coding will be applied to compress a text file. The program steps are as follows: The text file used for this assignment is called filename.txt. You can choose any text file Copy the file to your home directory, check out the content of this file. Read text file into vector y (you can truncate the original data to the desired length) Hint You can use this fid fopen (‘filename.txt'[A count]fread (fid); -A is a vector that contains the ASCII values of the characters in filename.trt (e.g. the letter “L” has the ASCII value “76”). -count is a scalar that returns the number of characters successfully read. Compute the character frequencies. Find the probability distribution of each symbols in the filename.txt. . Construct the Huffman tree Hint You can use this dict huffmandict (symbols,prob) . Encode the symbols and form the bit stream. Hint You can use this comp = huftmanenco (symbols, dict); . Decode from the Huffman code back to symbols. You should have exactly the same sequences Hint You can use this dsig huffmandeco (comp, dict) isequal (A, dsig) Calculate the coding efficiency (average length of bits/symbol over entropy), and compression ratio compared with PCM encoding. Refer to data analysis section. Show transcribed image text Task: PART 1: In this exercise, Huffman coding will be applied to compress a text file. The program steps are as follows: The text file used for this assignment is called filename.txt. You can choose any text file Copy the file to your home directory, check out the content of this file. Read text file into vector y (you can truncate the original data to the desired length) Hint You can use this fid fopen (‘filename.txt'[A count]fread (fid); -A is a vector that contains the ASCII values of the characters in filename.trt (e.g. the letter “L” has the ASCII value “76”). -count is a scalar that returns the number of characters successfully read. Compute the character frequencies. Find the probability distribution of each symbols in the filename.txt. . Construct the Huffman tree Hint You can use this dict huffmandict (symbols,prob) . Encode the symbols and form the bit stream. Hint You can use this comp = huftmanenco (symbols, dict); . Decode from the Huffman code back to symbols. You should have exactly the same sequences Hint You can use this dsig huffmandeco (comp, dict) isequal (A, dsig) Calculate the coding efficiency (average length of bits/symbol over entropy), and compression ratio compared with PCM encoding. Refer to data analysis section.

Expert Answer


Answer to Can I get some help? I don’t know what the code is supposed to look like for this part…. . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *