Question: Please do not answer if you are not in msa university As an electric current moves through a wire, heat generated in it by the
Please do not answer if you are not in msa university

As an electric current moves through a wire, heat generated in it by the electrical resistance is conducted throug My Solutions surrounding air (see the picture above), The steady state temperature of the wire can be calculated as given the following parameters q - heat generation rate = 75W/m, r. = wire radius = 0.006m, k = thermal condi coefficient = 12W/m' 10, and T_= air temperature = 293 K. The minimum for this function falls between n = 0 in your code below. We want our final estimate for the minimum to have an error of less than 0.01%. The goal of this script is to use the Golden Section Search method to find the optimal Insulation thickness ( thickness, NOT a radius, This script should include the following . Anonymous functions for defining the equation for T- While loops, Use an iteration counter and the actual error as conditions for your while loop W/Elseif/Else statements Iprintf statements Use the plot and 'scatter' functions to create line plots and scatter plots respectively Your code may NOT use the following commands varargin' while 1' or while true' break Requirements 1. Start your code with your full name in the commented line, and the opening commands that we use to 2. Define the proper stopping conditions for your while loop. in particular, your specified error as; and as 3 Set up an anonymous function named Tw that solves for 7. when given a r, value. Make sure that you h, and Tair. 4 Set up a subroutine (i e., NOT an anonymous function) called golden_search inside of which you shou subroutine should be general enough to solve ANY root searching problem (not just the one above) He solve for the root (upper and lower bounds of the search space, the equation whose root you are solving should output the final values of the root and of the approximate error ea. 5. Since the subroutine is not specific to the wire problem above, everything inside of it should be named i the search space should be named ri_Lower and ri Upper outside of the subroutine (l.e., in the main s anonymous function representing the equation whose root you are solving for should be named Tw out 6. In your While loop for the Golden Section Search method inside of your subroutine, you should calcula estimate for the next iteration of your loop using the Golden Section Search, as well as calculate the en the value of the error is defined as follows: c. = (2-) . |-" - 100%. Note that you should inil Section Search inside of the subroutine 7. Use the fprintf function to display the values of your four x values (xL, x1, x2. xU) corresponding to the method, the values of your equation (evaluated at those four x values, the bracket size d and the sporo: Math Worka Learning Tool store the received values into variables named rl final and ea final, respectively. 9. Find the "true minimum" in the main script by using the fminbind Matlab function, and save this value to 10. Create arrays, r_plot and T_plot in the main script for your line plot. r_plot should be an array of numb should be the value of T'. at each value in your r_plot array. 11. Using the arrays r_plot and T_plot, as well as your final thickness estimate and your anonymous funct superimpose a scatter plot with your final insulation thickness value and its corresponding wire temper Important variable names for the Matlab Grader . Make sure that your function is named correctly as Tw, and accepts one Input variable named ri in the Make sure that your specified error and actual error are named es and en respectively in the main scrip Make sure that the Golden Section Search variables, phi and d, are named correctly in the subroutine . Make sure that your While Loop's variable x opt new is named correctly in the subroutine Make sure that your final values from your loop, ri_final and ea_final are named correctly in the main . Make sure that your "true root" found with Matlab's fminbed function is named as rl fminand in the m . Make sure that your line plot arrays are named r plot and T_plot respectively in the main script Since the subroutine should not be specific to the wire problem above. everything inside of it should be bounds of the search space should be named ri_Lower and ri_Upper outside of the subroutine (le. the anonymous function representing the equation whose root you are solving for should be named T main script) Script Save Reset MATLAB Documentation (https //www.mathworks.com/help Student Name: 2 3 q = 75: [W/m] heat generation rate 4 rw = 0.006: " [m] wire radius k = 0.17; (W/(m K) ] thermal conductivity of insulation h = 12; * [W/(m-2 K)] convection heat transfer coefficient Tair = 293; * [K] air temperature ri_Lower - 0.007: [m] Initial lower bound for insulation thickness ri_Upper = 0.009; & [m] Initial upper bound for insulation thickness
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
