Programing

apparently I was skipped by accident

13.2 A quadratic Julia set has the form

z(n+1)=z(n)^2+c

The special case where c=-.123+.745i is called Douday's rabbit fractal. Follow example 13.1, and create an image using this value of c. For the Madelbrot image, we started with all z-values equal to 0. You'll need to start with z=x+yi. Let both x and y vary from -1.5 to 1.5.

I'm really confused by this question. Here's my attempt at a solution. I really hope someone can help me. My book did a very bad explaining the matter.

Code:
>> iterations=80;
grid_size=500;
[x,y]=meshgrid(linspace(-1.5,1.5,grid_size),linspace(-1.5,1.5,grid_size));
c=-.123+.745*i;
z=x+y*i;
map=x+y*i;
for k=1:iterations
z=z.^2+c;
a=find(abs(z)>sqrt(5));
map(a)=k;
end
figure(1)
image(map)
colormap(jet)
??? Error using ==> image
Error using ==> image
Image CData can not be complex

  1. 👍 0
  2. 👎 0
  3. 👁 81
asked by Lee
  1. We have only one or two tutors who can help with programming, and they don't get online every day. Please be patient.

  2. It looks to me that your code follows the logic correctly.
    There is a minor error which caused the error message, namely you have defined the map matrix to be complex. When it comes to plot, it causes difficulties.

    On line 6, try setting all values to zero
    map=zeros(grid_size, grid_size)
    which will be replaced by the (max) number iterations during the iterations.

    Using a grid of 51 (instead of 500), it gives me a pattern not dissimilar to what's expected. I am not able to test the plotting part.

    Try and post to let us know if it works or not.

    1. 👍 0
    2. 👎 0

Respond to this Question

First Name

Your Response

Similar Questions

  1. Physical Science

    Julia and Wayne heat their house during the winter with an electric heater. The thermostat on the heater is set to 20 °C and the thermostat is cycling on and off as it keeps the room temperature stable. Julia walks out of the

    asked by Raven on October 17, 2010
  2. thermodynamics

    Julia and Wayne heat their house during the winter with an electric heater. The thermostat on the heater is set to 20°C and the thermostat is cycling on and off as it keeps the room temperature stable. Julia walks out of the room

    asked by seb on August 31, 2013
  3. Math

    What do you learn from these stage directions? [The faintest trace of a smile on her lips] A. Julia is suddenly very happy. B. Julia knows something mistress don't know. C. Julia has made an important decision. D. Julia is

    asked by Clair on April 16, 2015
  4. L.A

    What do you learn from these stage directions in The Governess? [The faintest trace of a smile her lips] A. Julia is suddenly very happy. B. Julia knows something Mistress doesn't know. C. Julia has made an important decision. D.

    asked by Dawn on April 15, 2015
  5. Pre-Calc

    Hello! I'm stuck on how to do this problem and would appreciate some help! Choose a non-zero complex number c for f(z) = z2+ c. Find a complex number v that is in the escape set. Find a complex number w that is in the prisoner

    asked by l on May 17, 2012
  6. Pre-Calculus

    Hello! I'm stuck on how to do this problem and would appreciate some help! Choose a non-zero complex number c for f(z) = z2+ c. Find a complex number v that is in the escape set. Find a complex number w that is in the prisoner

    asked by Anonymous on May 18, 2012
  7. Math 222

    I am starting to wonder why when I ask for help with my math problems, I get skipped over? This has happened to me a few times. I thought this site was to help those, but apparently not. I just need to know where to start, not the

    asked by Raven on April 10, 2015
  8. L.A. The Governess :)

    The literature is The Governess by Neil Simon. What do you learn from these stage directions in The Governess? [The faintest trace of a smile her lips] A. Julia is suddenly very happy. B. Julia knows something Mistress doesn't

    asked by Anonymous on April 23, 2015
  9. calculus

    f(x) = (9x^3 - 1x^2 + 8x + 4)/(-2x^2 - 4x - 2) What is the smallest value of x at which f(x) intersects its non-vertical asymptote? I took the slant asymptote which is -9/2x+19/2 and set it equal to the function and tried to solve

    asked by Pegs on May 28, 2010
  10. English

    From which statement in The Governess could you conclude that mistress is self important? A. I didn't bother making a note of it because I always do it*** B. Maybe you heard forty when I said thirty C. I excelled in mathematics.

    asked by Abby on April 23, 2015

More Similar Questions