Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB Suppose a data source produces a series of characters drawn from a set of M distinct symbols. If symbol k is produced with probability

MATLAB

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

image text in transcribedk=1 in this.

Essentially H1 is the number of bits needed per symbol to encode a long message; that is, measures the amount of information content, and therefore the potential success of compression strategies. The value H1 = 0 corresponds to the case of only one symbol being produced--no information-- while if all M symbols have equal probability, then H1 = log2M .

Write a function [H,M] = entropy(v) that computes entropy for a vector v. The probabilities should be computed emperically by finding the unique entries (using unique), then counting the occurences of each symbol and dividing by then legnth of v. Try your function on some built-in image data by entering load clown, v = X(:); .

H1 1pklogopk

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions

Question

Functions of Nonverbal Communication

Answered: 1 week ago

Question

4. Who should be invited to attend?

Answered: 1 week ago

Question

7. How will you encourage her to report back on the findings?

Answered: 1 week ago