Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Matlab / Lossless Compression: The main purpose of this exercise is for you to gain some expe- rience programming in Matlab. On Brightspace you
1. Matlab / Lossless Compression: The main purpose of this exercise is for you to gain some expe- rience programming in Matlab. On Brightspace you will find code implementing Huffman trees for lossless compression. Be sure to read the README. 1. Adapt the code to also generate Shannon-Fano trees. 2. Test your Shannon-Fano code on the simple example included with the code. Draw the Shannon- Fano tree generated by your code. 3. Compute both a Huffman tree and a Shannon-Fano tree for the larger example included with the code. Compute and compare the compression rates achieved by the two algorithms. 4. Write code that groups symbols into pairs as described on Slide 21. Then test whether the resulting code trees are more effective for encoding the data from the larger example than the code trees generated when encoding single symbols. For this assignment, do not use any code you find on the web. In all of your code, avoid loops as much as possible. Please submit your code as well as other information as requested. Also include a concise activity log of a Matlab session (using the diary function) that illustrates how your code works. Marks will be based on the quality of your code and correctness of your findings as well as on the presentation of your results. 1. Matlab / Lossless Compression: The main purpose of this exercise is for you to gain some expe- rience programming in Matlab. On Brightspace you will find code implementing Huffman trees for lossless compression. Be sure to read the README. 1. Adapt the code to also generate Shannon-Fano trees. 2. Test your Shannon-Fano code on the simple example included with the code. Draw the Shannon- Fano tree generated by your code. 3. Compute both a Huffman tree and a Shannon-Fano tree for the larger example included with the code. Compute and compare the compression rates achieved by the two algorithms. 4. Write code that groups symbols into pairs as described on Slide 21. Then test whether the resulting code trees are more effective for encoding the data from the larger example than the code trees generated when encoding single symbols. For this assignment, do not use any code you find on the web. In all of your code, avoid loops as much as possible. Please submit your code as well as other information as requested. Also include a concise activity log of a Matlab session (using the diary function) that illustrates how your code works. Marks will be based on the quality of your code and correctness of your findings as well as on the presentation of your results
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started