Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using Matlab 3.5. Suppose a data source produces a series of characters drawn from a set of M distinct symbols. If symbol k is produced
Using Matlab
3.5. Suppose a data source produces a series of characters drawn from a set of M distinct symbols. If symbol k is produced with probability pk, the first-order entropy of the source is defined as k-1 Essentially Hi is the number of bits needed per symbol to encode a long mes- sage; that is, it measures the amount of information content, and therefore the potential success of compression strategies. The value Hi -0 corre- sponds to the case of only one symbol being produced-no information- while if all M symbols have equal probability, then H1 -log2 M. Write a function [H,M) entropy (v) that computes entropy for a vector v. The probabilities should be computed empirically by finding the unique entries (using unique), then counting the occurrences of each symbol and dividing by the length of v. Try your function on some built-in image data by entering load clown, v -X(:)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