MathGroup Archive 2011

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

Search the Archive

Re: mandelbrot in version 7 & Ruskeepaa version 3

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120438] Re: mandelbrot in version 7 & Ruskeepaa version 3
  • From: Curtis Osterhoudt <cfo at lanl.gov>
  • Date: Fri, 22 Jul 2011 19:46:18 -0400 (EDT)
  • References: <201107220109.VAA16854@smc.vnet.net>
  • Reply-to: cfo at lanl.gov

Looks as though the "Iy" in the code needs to be I (that's a capital aye) times why: I*y. If there wasn't a space in the original code, Mathematica interprets it as a new, two-character symbol, not the product of the imaginary basis times y. 

   Hope that helps!

 

On Thursday, July 21, 2011 19:09:03 DaleJenk wrote:
> I bought Mathematica 7 Home Edition last year. I'm trying to plot the 
> Mandelbrot Set following the instructions in Ruskeepaa's Mathematica 
> Navigator version 3. I'm getting an error message.
> 
> Here's what I am introducing:
> 
> mandelbrot = Compile[{{c,_Complex}},
> Module[{z=0+0I, n=0}, While[Abs[z]<2 && n<50, z=z^2+c; n++]; n]];
> 
> DensityPlot[mandelbrot[x+Iy], {x,-2,1},{y,-1.5,1.5}, PlotPoints->200, 
> Mesh->False, FrameTicks->{{-2,-1,0,1},{-1,0,1}}]; //Timing
> 
> I get the message:
> 
> CompiledFunction::cfsa:
> Argument -1.99998 + Iy at position 1 should be a machine-size complex 
> number.
> 
> Where am I going wrong?
> 
> Thanks.
>  
> 
> 
> 



  • Prev by Date: Re: mandelbrot in version 7 & Ruskeepaa version 3
  • Next by Date: Code is not working...
  • Previous by thread: mandelbrot in version 7 & Ruskeepaa version 3
  • Next by thread: Re: mandelbrot in version 7 & Ruskeepaa version 3