Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . Complete the learner template to compute the power output from a wind turbine with and wind velocity . ( Note that ) .
Complete the learner template to compute the power output from a wind turbine with and wind velocity Note that Assigns the resulting value in Watts to a variable named windpower. Continue completing the template to use a vector of radius values rvals and calculate the corresponding power output of the turbine with those radii at the same wind velocity as above. Use vector operations in Matlab. See reference In a figure plot rvals versus poweroutput. Label the xaxis 'Radius m and the yaxis 'Power W Use a fontsize of for your axis labels. Use a red line in your plot with a thickness of units. Indicate every data point with Store the elements of the rendered line in a "graphics handle" called 'graphproperties'. Hint : see help for plot, xlabel commands Note that the tests in this automatically graded script are very strict so your spacing and syntax in the labels has to be exactly as written here. If you have to perform the same mathematical operation on arrays of numbers in MATLAB, you have two approaches you can use. This actually also applies to other numerical packagages like numpy and scipy in Python You can use 'for loops' or vector operations. In MATLAB, vector operations are faster than 'for loops'. You will now test this observation yourself by implementing the calculation in above using the two methods: 'for loops' and vector operations and then measuring the time it takes for the computer to perform the computation. You will need to use MATLAB function 'tic' and 'toc' to calculate elapsed time. You will need to measure the average execution time over iterations use variable M to denote number of iterations of each method to get a reliable measure of Tf for loop execution time and Tv vector computation" execution time Use MATLAB help to figure this out as well as Complete the learner template code to perform the following steps. Use the vector math you used in above to perform the same calculation times. Assign the values to poweroutputa This should be the same as poweroutput you calculated above. Assign the duration to the variable Tv Use a single "for loop" to calculate the power output in Assign the values to the vector poweroutputf Measure the time it takes to perform this operation times. Assign that value to the variable Tf Calculate the ratio TfTv and assign that to the variable ratio.
Complete the learner template to compute the power output from a wind turbine with and wind velocity Note that Assigns the resulting value in Watts to a variable named windpower.
Continue completing the template to use a vector of radius values rvals and calculate the corresponding power output of the turbine with those radii at the same wind velocity as above. Use vector operations in Matlab. See reference In a figure plot rvals versus poweroutput. Label the xaxis 'Radius m and the yaxis 'Power W Use a fontsize of for your axis labels. Use a red line in your plot with a thickness of units. Indicate every data point with Store the elements of the rendered line in a "graphics handle" called 'graphproperties'. Hint : see help for plot, xlabel commands Note that the tests in this automatically graded script are very strict so your spacing and syntax in the labels has to be exactly as written here.
If you have to perform the same mathematical operation on arrays of numbers in MATLAB, you have two approaches you can use. This actually also applies to other numerical packagages like numpy and scipy in Python You can use 'for loops' or vector operations. In MATLAB, vector operations are faster than 'for loops'. You will now test this observation yourself by implementing the calculation in above using the two methods: 'for loops' and vector operations and then measuring the time it takes for the computer to perform the computation. You will need to use MATLAB function 'tic' and 'toc' to calculate elapsed time. You will need to measure the average execution time over iterations use variable M to denote number of iterations of each method to get a reliable measure of Tf for loop execution time and Tv vector computation" execution time Use MATLAB help to figure this out as well as Complete the learner template code to perform the following steps.
Use the vector math you used in above to perform the same calculation times. Assign the values to poweroutputa This should be the same as poweroutput you calculated above. Assign the duration to the variable Tv
Use a single "for loop" to calculate the power output in Assign the values to the vector poweroutputf Measure the time it takes to perform this operation times. Assign that value to the variable Tf
Calculate the ratio TfTv and assign that to the variable ratio.
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