Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The Sierpinski triangle can be implemented in MATLAB by plotting points iteratively according to one of the following three rules that are selected randomly with
The Sierpinski triangle can be implemented in MATLAB by plotting points iteratively according to one of the following three rules that are selected randomly with equal probability. Rule 1: x_n + 1 = 0.5x_n, y_n + 1 = 0.5y_n Rule 2: x_n + 1 = 0.5x_n + 0.25, y_n + 1 = 0.5y_n + (squareroot 3)/4 Rule 3: x_n + 1 = 0.5x_n + 0.5, y_n + 1 = 0.5y_n Write a program in a script file that calculates the x and y vectors and then plots y versus x as individual points (use plot (x, y, '^')). Start with x_1 = 0 and y_1 = 0. Run the program four times with 10, 100, 1,000, and 10,000, iterations
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started