Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 1 The Sierpinski triangle can be implemented in MATLAB by plotting points iteratively according to one of the following three rules which are selected
Problem 1 The Sierpinski triangle can be implemented in MATLAB by plotting points iteratively according to one of the following three rules which are selected randomly with equal probability.
Rule1: ?? =0.5?? , ?? =0.5??
Rule 2: Rule 3:
??+1 ?? ??+1 ??
?? = 0.5?? + 0.25 , ?? = 0.5?? + ?3
??+1 ?? ??+1 ??
4
?? = 0.5?? + 0.5 , ?? = 0.5?? ??+1 ?? ??+1 ??
Write a program in a script file that calculates the ?? and ?? vectors and then plots ?? versus ?? as individual points (use plot(x,y,^) ). Start with ??1 = 0 and ??1 = 0. Run the program four times with 10, 100, 1,000, and
10,000 iterations. Present the graphs for 10, 100, 1,000, and 10,000 iterations. For 10,000 iterations, the graph will look a bit like the one shown above.
This written work is my code. It says something is wrong with the randi because I didnt use integers. Please help me thank you
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