Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*** Matlab only My code so far, stuck in for loop. clear, clc, close all figure(9) title('Wind Turbine') hold on pole = [ -2, 2,

*** Matlab only

My code so far, stuck in for loop.

clear, clc, close all figure(9) title('Wind Turbine') hold on pole = [ -2, 2, 1, -1; -50 -50, 0, 0]; x = pole(1, :); y = pole(2, :); fill(x, y, [0.5, 0.5, 0.5]); % dark grey

blade1 = [0, 5, 20, 20, 5, 0; -1, -2, -1, 1, 2, 1; 1, 1, 1, 1, 1, 1]; x = blade1(1, :); y = blade1(2, :); h1 = fill(x, y, "blue");

hold on blade2 = rotate(120)* blade1; % rotate blade1 by 120 degrees to create blade2. Draw it! x= blade2(1,:); y=blade2(2,:); h2= fill(x,y, 'blue');

hold on blade3= rotate(120)* blade2; x=blade3(1,:); y=blade3(2,:); h3= fill (x,y, 'blue')

% rotate blade2 by 120 degrees to create blade3. Draw it! circle(0, 0, 2) % draw the hub axis equal axis([-25, 25, -50, 25]) grid on set(gca, 'fontsize', 20)

N = 10 % ten complete revolutions delta = 5; % degrees for k = 1 : 72*N delete(h1) delete(h2) delete(h3)

new_blade1= rotate(delta)*blade1; x=new_blade1(1,:); y=new_blade1(2,:); h1=fill(x, y, 'pink'); hub = circle(0, 0, 2); pause(0.025) end

image text in transcribed

Question 10: Animated Wind Turbine The wind is strong and steady today! Time to generate some power! Complete this for-loop, to make your turbine perform 10 complete revolutions. We'll advance each blade by 5 degrees on each iteration % 10. Animate the wind turbine! Make it spin!! N- 10 % ten complete revolutions delta- 5; % degrees for k1: 72*N % delete the previous position of each blade and the old hub delete(hub) % delete h1, h2 and h3 here % rotate each blade by delta redefine blade 1, blade2 and blade3 here-rotate each by delta % draw all three blades using fill. Use the handles h1, h2 and h3 as before % draw the hub again hub-circle(0, 0, 2) pause(0.025) end

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

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

Students also viewed these Databases questions

Question

3. Identify challenges to good listening and their remedies

Answered: 1 week ago

Question

4. Identify ethical factors in the listening process

Answered: 1 week ago