Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Plot a simple function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74895] Re: [mg74845] Plot a simple function
  • From: Jmbatista at aol.com
  • Date: Tue, 10 Apr 2007 05:18:58 -0400 (EDT)

 
Paul, the binary entropy function is defined as h(x) = -p log(p) - (1 - p) 
log(1 - p).  The log in this formula is binary logarithm.  Given that h(0) = 
h(1) = 0, you can then execute the following commands to plot the graph you are 
looking for:
 
            h[x_] := - x * Log[2,x] - (1 - x) * Log[2,1 - x]
            Plot[h[x], {x,0,1}]
 
Hope this helps.
J. Batista
 
_______________
In a message dated 4/8/2007 5:31:59 AM Eastern Daylight Time, 
jorgecordero at gmail.com writes:

Hi, a simple query. Do you know how could I plot the entropy function
in Mathematica? I wish to produce an image similar to this one:

http://upload.wikimedia.org/wikipedia/commons/c/c9/Binary_entropy_plot.png

Do you know how could I plot mutual information between two random
variables X and Y in a 3D surface in Mathematica?

Thanks!

Paul.







  • Prev by Date: Re: reliability function drawing
  • Next by Date: Re: Simplification with Integers assumption
  • Previous by thread: Re: Plot a simple function
  • Next by thread: Re: Plot a simple function