22 - MATLAB Mandelbrot - Full

22 - MATLAB Mandelbrot - Full - Engineering101 program!

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Click to edit Master subtitle style Engineering 101 MATLAB Applications:  Mandelbrot Set program!
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Quote of the Day - B. F.  Skinner Education is what survives when what has been  learned has been forgotten.
Background image of page 2
MATLAB Programming Example:
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Programming Example: n Fractals are of interest because, in addition to  being mathematically beautiful objects, they  have the property of self-similarity. n In this respects they are like a number of  natural and man-made systems like coastlines  and rough surfaces.
Background image of page 4
The Mandelbrot set n Generated from the equation: 2 1 m m z z c + = +
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The Mandelbrot set n Generated from the equation: 2 1 m m z z c + = + c=1 z1=0 z2=1 z3=2 z4=5 z5=2 6 z6=677 z7=458330 c=0.1 z1=0 z2=0.1z3=0.11 z4=0.112 1 z5=0.11256
Background image of page 6
The Mandelbrot set n We determine the value of a point by determining  how many iterations it takes to grow greater than 2  and dividing by the total number of iterations. n For example, consider 10 total iterations n M(1) = 0.4 n M(0.1) = 1 (it never becomes greater than 2) c=1 z1=0 z2=1 z3=2 z4=5 z5=2 6 z6=677 z7=458330 c=0.1 z1=0 z2=0.1z3=0.11 z4=0.112 1 z5=0.11256
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The Mandelbrot set n The trick is we do this with complex numbers. n So every point in the plane has a real value given by  the x axis and an imaginary value given by the y axis. n Squares of imaginary numbers are taken in the  standard way (1+2i)2 = (1+2i)(1+2i) = 1+2i+2i+4i2 = 1+4i -4 = -3+4i n The condition to stop the iteration will be that the  norm, absolute value, of the number (the square root  of the number times its complex conjugate) is greater
Background image of page 8
n So to make the set we must first write a function that  will take as input: n a matrix c where each element of the matrix is a complex  number n a number of iterations, niters n It will have to set the initial values of z for each c to 0. n
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 35

22 - MATLAB Mandelbrot - Full - Engineering101 program!

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online