Question: 1. Write a Matlab function that takes a 1-d matrix (vector) of symbols (characters) as a parameter and returns the entropy value for the matrix.

 1. Write a Matlab function that takes a 1-d matrix (vector)

1. Write a Matlab function that takes a 1-d matrix (vector) of symbols (characters) as a parameter and returns the entropy value for the matrix. The function should be included inside an M file. 2. Given the following table, which contains a list of symbols and their frequencies, do the following: (A) Fill the table below with the correct values. You need to apply the Huffman coding algorithm on the input symbols and their frequencies to get Huffman code for each symbol. You must show the steps of applying the algorithm in your answer. (B) Calculate the entropy, and the average number of bits used in Huffman coding and compare them. Huffma n code # of bits for code used in symbo frequenc pi*log2(p each lengt Huffman . log2(pi)) symbol h code A 15 B 2 C 6 D 10 E 22 F 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!