Results 1 to 4 of 4

Math Help - Zooming problem!

  1. #1
    Newbie
    Joined
    Feb 2010
    Posts
    12

    Lightbulb Zooming problem!

    Hello,
    I have a program for Julia set (Fractals), shown below:

    Code:
    function julian(itr,refine)
    xo=0;
    yo=0;
    l=2;
    x=linspace(xo-l,xo+l,refine);
    y=linspace(yo-l,yo+l,refine);
    [xp,yp]=meshgrid(x,y);
    C= -.8+.156*i;
    zp=xp+i*yp;
    for k=1:itr;
    zp=zp.^2+C;
    fractal=exp(-abs(zp));
    end
    colormap jet(256)
    pcolor(fractal);
    shading interp;
    axis('square','equal');
    end
    RUN THE CODE : julian (20,2000)

    My problem is that I cannot zoom! If I zoom it doesn't show details. Is there a function or a way to make Matlab know the two points I selected and solve for them giving me a new figure for the selected region?

    Thanks,
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie ibrex77's Avatar
    Joined
    May 2010
    From
    Amman, Jordan
    Posts
    5

    draw each iteration

    Hi,
    I understand you want to see each fractal dimension. You may add this code inside the for loop after computing the fractal.
    Code:
    colormap jet(256)
    pcolor(fractal);
    shading interp;
    axis('square','equal');
    drawnow
    pause
    this code will pause the execution until you press enter in the main matlab window.

    regards,
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Feb 2010
    Posts
    12
    Actually what I want is to replot the figure with the new coordinated I select!
    Like how can I tell matlab that I selected those two specific points, but I am not sure how can I link my mouse selections to the program!!!
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by beho86 View Post
    Actually what I want is to replot the figure with the new coordinated I select!
    Like how can I tell matlab that I selected those two specific points, but I am not sure how can I link my mouse selections to the program!!!
    >help ginput

    or see here

    CB
    Follow Math Help Forum on Facebook and Google+

Search Tags


/mathhelpforum @mathhelpforum