Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Plotting a function -

  • To: mathgroup at
  • Subject: [mg71642] Plotting a function -
  • From: Craig Reed <tharkun860 at>
  • Date: Sat, 25 Nov 2006 05:37:25 -0500 (EST)

Hi -

I'm trying to get Mathematica 5.2 to graph a function which is the ratio of 
integers which have a '3' in them. Done in Exce3l, the graph of the first 
32,000 data points has a fractal look to it, especially when done with a 
log scale.

What I've tried is the following

f[x_] := Boole[DigitCount[x, 10, 3]]
g[x_] := Sum[f, {i, x}]/x
Plot[g, {x, 1, 100}]

I get 3 errors of "g is not a michine-size real number at" followed by 3 
real numbers:

What am I doing wrong?  or perhaps what I should ask is, "Is there a better 

  • Prev by Date: Mathematica "Interpolation" function
  • Next by Date: Nonlinear Regression
  • Previous by thread: Re: Mathematica "Interpolation" function
  • Next by thread: Nonlinear Regression