Question: Exercise 1 Suppose you have a data source that produces a series of characters drawn from a set of distinct symbols. If symbol is produced

Exercise 1
Suppose you have a data source that produces a series of characters drawn from a set of distinct symbols. If symbol is produced with probability , the first-order entropy of the source is defined by
This value is the number of bits needed per symbol to encode a long message. It is a measure of the informational content of the message and indicates the potential effectiveness of data compression strategies. If , then there is only one symbol present and no information is present. If all symbols have equal probability, then .
Compute the first-order entropy by finding the number of unique entries in the message, ,(using unique), then counting the occurrences of each symbol and dividing by the length of .
Use the following built-in data from MATLAB as your vector .
load clown
v = X(:);
% image(X)
% colormap(map)
You may uncomment the last two lines if you want to see the image.

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 Programming Questions!