1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Natalka [10]
4 years ago
7

The Sierpinski triangle can be implemented in MATLAB by plotting points iteratively according to one of the following three rule

s that are selected randomly with equal probability. Rule 1: x_n + 1 = 0.5x_n, y_n + 1 = 0.5y_n Rule2: x_n + 1 = 0.5x_n + 0.25, y_n + 1 = 0.5y_n+|( 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 x1 = 0 and y1 = 0. Run the program four times with 10, 100, 1,000, and 10,000 iterations.

Engineering
1 answer:
Reil [10]4 years ago
4 0

Answer:

See explaination and attachment for theprogram code and output.

Explanation:

matlab program:

x1(1)=0;

y1(1)=0;

x2(1)=0;

y2(1)=0;

x3(1)=0;

y3(1)=0;

for i=1:10

x1(i+1)=0.5*x1(i);

y1(i+1)=0.5*y1(i);

x2(i+1)=0.5*x2(i)+0.25;

y2(i+1)=0.5*y2(i)+(sqrt(3)/4);

x3(i+1)=0.5*x3(i)+0.5;

y3(i+1)=0.5*y3(i);

end

figure

hold on

plot(x1,y1,'*')

plot(x2,y2,'*')

plot(x3,y3,'*')

hold off

Please kindly check attachment for output of 10, 100 and 1000 respectively.

You might be interested in
Steam at 1400 kPa and 350°C [state 1] enters a turbine through a pipe that is 8 cm in diameter, at a mass flow rate of 0.1 kg⋅s−
sergeinik [125]

Answer:

Power output, P_{out} = 178.56 kW

Given:

Pressure of steam, P = 1400 kPa

Temperature of steam, T = 350^{\circ}C

Diameter of pipe, d = 8 cm = 0.08 m

Mass flow rate, \dot{m} = 0.1 kg.s^{- 1}

Diameter of exhaust pipe, d_{h} = 15 cm = 0.15 m

Pressure at exhaust, P' = 50 kPa

temperature, T' =  100^{\circ}C

Solution:

Now, calculation of the velocity of fluid at state 1 inlet:

\dot{m} = \frac{Av_{i}}{V_{1}}

0.1 = \frac{\frac{\pi d^{2}}{4}v_{i}}{0.2004}

0.1 = \frac{\frac{\pi 0.08^{2}}{4}v_{i}}{0.2004}

v_{i} = 3.986 m/s

Now, eqn for compressible fluid:

\rho_{1}v_{i}A_{1} = \rho_{2}v_{e}A_{2}

Now,

\frac{A_{1}v_{i}}{V_{1}} = \frac{A_{2}v_{e}}{V_{2}}

\frac{\frac{\pi d_{i}^{2}}{4}v_{i}}{V_{1}} = \frac{\frac{\pi d_{e}^{2}}{4}v_{e}}{V_{2}}

\frac{\frac{\pi \times 0.08^{2}}{4}\times 3.986}{0.2004} = \frac{\frac{\pi 0.15^{2}}{4}v_{e}}{3.418}

v_{e} = 19.33 m/s

Now, the power output can be calculated from the energy balance eqn:

P_{out} = -\dot{m}W_{s}

P_{out} = -\dot{m}(H_{2} - H_{1}) + \frac{v_{e}^{2} - v_{i}^{2}}{2}

P_{out} = - 0.1(3.4181 - 0.2004) + \frac{19.33^{2} - 3.986^{2}}{2} = 178.56 kW

4 0
3 years ago
When we utilize a visualization on paper/screen, that visualization is limited to exploring: Group of answer choices Relationshi
Mila [183]

Answer:

As many variables as we can coherently communicate in 2 dimensions

Explanation:

Visualization is a descriptive analytical technique that enables people to see trends and dependencies of data with the aid of graphical information tools. Some of the examples of visualization techniques are pie charts, graphs, bar charts, maps, scatter plots, correlation matrices etc.

When we utilize a visualization on paper/screen, that visualization is limited to exploring as many variables as we can coherently communicate in 2-dimensions (2D).

6 0
3 years ago
Select the correct answer.
Lilit [14]

Answer:

D

Explanation:

Confidential data is not supposed to be shared amongst others.

8 0
4 years ago
Read 2 more answers
Pedro holds a heavy science book over his head for 10 minutes. Petro is doing work during that time. True or False
algol [13]

Answer:

True because he is working his arms to lift and hold the weight

Explanation:

4 0
3 years ago
9. A vehicle is having routine maintenance performed.
dexar [7]

Answer: b

Explanation:

8 0
3 years ago
Other questions:
  • How an AK 47 gun was works​
    14·1 answer
  • An op-amp is connected in an inverting configuration with R1 = 1kW and R2 = 10kW, and a load resistor connected at the output, R
    9·1 answer
  • I need help!!! Because this is due
    14·2 answers
  • Two cars A and B leave an intersection at the same time. Car A travels west at an average speed of x miles per hour and car B tr
    9·1 answer
  • In sleep, what does REM stand for?
    10·1 answer
  • Which option identifies the step of the implementation phase represented in the following scenario?
    9·2 answers
  • Multiple Choice
    10·1 answer
  • Determine the slopes and deflections at points B and C for the beam shown below by the moment-area method. E=constant=70Gpa I=50
    10·1 answer
  • A retail business, owned by share holders and having centralized decision making for their multiple store locations is called:
    13·1 answer
  • A cross beam in a highway bridge experiences a stress of 14 ksi due to the dead weight of the bridge structure. When a fully loa
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!