Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #3904 > unrolled thread
| Started by | "DaleJenk" <dale.jenkins8@deletegooglemail.com> |
|---|---|
| First post | 2011-07-22 01:15 +0000 |
| Last post | 2011-07-22 23:56 +0000 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
mandelbrot in version 7 & Ruskeepaa version 3 "DaleJenk" <dale.jenkins8@deletegooglemail.com> - 2011-07-22 01:15 +0000
Re: mandelbrot in version 7 & Ruskeepaa version 3 "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-07-22 07:42 +0000
Re: mandelbrot in version 7 & Ruskeepaa version 3 "DaleJenk" <dale.jenkins8@deletegooglemail.com> - 2011-07-22 23:56 +0000
Re: mandelbrot in version 7 & Ruskeepaa version 3 "Kevin J. McCann" <kjm@KevinMcCann.com> - 2011-07-22 23:56 +0000
| From | "DaleJenk" <dale.jenkins8@deletegooglemail.com> |
|---|---|
| Date | 2011-07-22 01:15 +0000 |
| Subject | mandelbrot in version 7 & Ruskeepaa version 3 |
| Message-ID | <j0aivf$ghq$1@smc.vnet.net> |
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.
[toc] | [next] | [standalone]
| From | "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> |
|---|---|
| Date | 2011-07-22 07:42 +0000 |
| Message-ID | <j0b9l4$jjj$1@smc.vnet.net> |
| In reply to | #3904 |
There is a space missing between I and y in the expression mandelbrot[x +
Iy] (should be mandelbrot[x + I y]). Also, you should omit the semicolon
after DensityPlot, otherwise the plot will not be shown.
Incidentally, tabulating the values and then plotting them with ArrayPlot
is faster for this example than using DensityPlot. That is,
ArrayPlot@Table[
mandelbrot[x + I y],
{y, -1.5, 1.5, 0.005}, {x, -2.0, 1.0, 0.005}
]
On Fri, 22 Jul 2011 02:15:27 +0100, DaleJenk
<dale.jenkins8@deletegooglemail.com> 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.
>
[toc] | [prev] | [next] | [standalone]
| From | "DaleJenk" <dale.jenkins8@deletegooglemail.com> |
|---|---|
| Date | 2011-07-22 23:56 +0000 |
| Message-ID | <j0d2ni$s3e$1@smc.vnet.net> |
| In reply to | #3908 |
Many thanks - to you, and to the people who replied to me privately.
"Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> wrote in message
news:j0b9l4$jjj$1@smc.vnet.net...
> There is a space missing between I and y in the expression mandelbrot[x +
> Iy] (should be mandelbrot[x + I y]). Also, you should omit the semicolon
> after DensityPlot, otherwise the plot will not be shown.
>
> Incidentally, tabulating the values and then plotting them with ArrayPlot
> is faster for this example than using DensityPlot. That is,
>
> ArrayPlot@Table[
> mandelbrot[x + I y],
> {y, -1.5, 1.5, 0.005}, {x, -2.0, 1.0, 0.005}
> ]
>
> On Fri, 22 Jul 2011 02:15:27 +0100, DaleJenk
> <dale.jenkins8@deletegooglemail.com> 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.
>>
>
[toc] | [prev] | [next] | [standalone]
| From | "Kevin J. McCann" <kjm@KevinMcCann.com> |
|---|---|
| Date | 2011-07-22 23:56 +0000 |
| Message-ID | <j0d2mk$s3b$1@smc.vnet.net> |
| In reply to | #3904 |
Two things. The error is due to your argument x+Iy in the call to
mandelbrot. You need a space between the I and the y, i.e. x+I y.
Second, you have a semicolon at the end of the DensityPlot call; this
prevents the plot from being shown.
Kevin
On 7/21/2011 9:15 PM, 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.
>
>
>
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web