Problem 785. Mandelbrot Number Test [Real+Imaginary]
The Mandelbrot Set is built around a simple iterative equation.
z(1) = c z(n+1) = z(n)^2 + c
Mandelbrot numbers remain bounded for n through infinity. These numbers have a real and complex component.
For a vector of real and complex components determine if each is a Mandelbrot number.
If abs(z)>2 then z will escape to infinity and is thus NOT valid.
Input: [-2; 0.22-0.54i ; 0.25-.54i ; 0.26 ;.125+.125i; 0.25]
Output: [1 ; 0 ; 1 ; 0 ; 1 ; 1] ...Where 1 is for a Valid Mandelbrot
Cleve Moler has a whole chapter on the Mandelbrot set in his book Experiments with MATLAB: Chapter 10, Mandelbrot Set (PDF)
Problem based upon Cody 81: Mandelbrot Numbers
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers23
Suggested Problems
-
Similar Triangles - find the height of the tree
286 Solvers
-
Back to basics 9 - Indexed References
438 Solvers
-
Rotate and display numbered tile
343 Solvers
-
Find the elements of a matrix according to a defined property.
84 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
810 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!