Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB PLS The evolution of the Sierpinski triangle Introduction The Sierpinski triangle can be implemented in MATLAB by plotting points iteratively according to one of

MATLAB PLSimage text in transcribedimage text in transcribedimage text in transcribed

The evolution of the Sierpinski triangle Introduction 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: Rule 1 Rule 2: Xn+0.5xn0.25 n0.5yn(3)4 Kn+1 = 0.5Kn + 0.5 Rule 3 Objective Nested loops, switch statement, random number generation, 2D data plotting Mini project Write a program that 1. Start with x10 and y0 2. Let Ns [10, 100, 1000, 10000]. Which means your grogram will run four times with 10, 100, 1000, and 10,000 interactions. The outer loop iteration times is 4 and the inner loop whose iteration times is N. 3. In every outer loop, generate a figure and assign the start value of x and y 4. In every inner loop, plot an individual point on that figure and move to the next x and y, following one of the rules 5. To ensure that three rules can be selected with equal probability, you could include a switch statement inside the inner loop. The switch statements should take in a random number. In each correlated case should be the implementation of one of the Rules Here is an example for the first case: case 1 x_next- 0.5x_curr y-next = 0.5"y-curr; plot(x_next,y_next,) hold on; 6. At last, you will generate four graphs. See sample graphs 0 45 0 38 03 0 25 02 0 05 N = 10 07 0 6 05 04 03 02 0 1 N 100 0.3 0 0.1 02 03 04 05 06 07 0809 1 N 1000 0.9 0.6 0.5 0.3 02 0.1 02 03 04 05 06 07 08 09 N 10,000

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions

Question

What are the main predictors of vocational choice in SCCT?

Answered: 1 week ago