22 - MATLAB Mandelbrot - Full

# 22 - MATLAB Mandelbrot - Full - Engineering101 program...

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

Click to edit Master subtitle style Engineering 101 MATLAB Applications:  Mandelbrot Set program!

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

View Full Document
Quote of the Day - B. F.  Skinner Education is what survives when what has been  learned has been forgotten.
MATLAB Programming Example:

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

View Full Document
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.
The Mandelbrot set n Generated from the equation: 2 1 m m z z c + = +

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

View Full Document
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
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

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

View Full Document
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
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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online