Question: Matlab Please The Sierpinski triangle can be implemented in MATLAB by plotting points iteratively ac- cording to one of the following three rules which are
Matlab Please
The Sierpinski triangle can be implemented in MATLAB by plotting points iteratively ac- cording to one of the following three rules which are selected randomly with equal probability. Rule 2: nt10.50.25, 0.5yn + Rule 3: n1-0.5n 0.5, nt-0.5yn Write a script file that calculates the r and y vectors and then plots y versus?as individual points. (Use plot(x,y.'' Start with 0 and y -0. Run the program four times, first with 10 iterations, then 100 iterations, then 1,000 iterations, and finally with 10,000 iterations. (Hints: The command rule - randi([1 3]) will generate a 1, 2, or 3 with equal probability. You might want to use a switch - case structure inside a for loop.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
