Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This Code is in MATLAB. Is it correct code? Please tell me. Thank you. Here is the excel file. #Description for the overall program Iron
This Code is in MATLAB. Is it correct code? Please tell me. Thank you.
Here is the excel file.
#Description for the overall program
Iron 2500 3500 4500 5000 5500 7500 9000 10250 11650 13050 14450 15850 17250 18650 20050 21450 22850 24250 25650 Aluminum Cadmium Tungsten 4800 6400 10400 12800 16000 17600 24000 26400 29920 33440 36960 40480 44000 47520 51040 54560 58080 61600 65120 2 3 2000 2500 3000 4000 5500 7500 8000 9750 11150 12550 13950 15350 16750 18150 19550 20950 22350 23750 25150 3000 4000 6500 8000 10000 11000 15000 16500 18700 20900 23100 25300 27500 29700 31900 34100 36300 38500 40700 6 10 12 13 14 15 16 17 18 19 20 21 Step # Specific Heat degC)) Specific Gravity Initial Temperature [de 2 GLYCEROL 3 ALUMINUM 2.400 0.897 1.26 2.72 25 300 % Import the data is provided in an Excel workbook titled "Cooling Metal", on the second worksheet titled "Cooling Info". The data continues below the row shown in the figure. The numerical values should be saved in Data, and the text values saved in Text. xlsread('Cooling Metal, A:D) SHg - Data[2,2) % Assume glycerol will always be listed in Row 2 of this worksheet. % Determine the specific heat of the glycerol. Save this in the variable SHg % Determine the initial temperature of the glycerol, and save this in the variable Tg1 Tg1 - Data12,4} 1 Contain the necessary information at the beginning to run correctly. Import the data from an Excel workbook called Cooling Metal, from the first worksheet called Mass. Ask the user to select a metal name from a menu Ask the user to select the mass of the metal from a menu Call the function. Print the output the Command Window. Overall Program Description 2. In a factory, various metal pieces are forged and then plunged into a cool liquid to quickly cool the metal. The specific heat, specific gravity, and initial temperature are given in the Excel workbook on the first tab, with the liquid in Row 2 and the types of metals in the remaining rows in the table. 3. 4. 5. The metal pieces can vary in mass, as given on the second tab of the Excel workbook 6. Your program should determine the amount of liquid, in gallons, needed to cool the metal chosen by the usen 1. Necessary information at the beginning to run correctly. Overall Function Description 2. Import the data from an Excel workbook called Cooling Metal, from the second worksheet called Cooling Info. Determine the specific heat, and initial temperature of the glycerol. Determine the specific heat, and initial temperature of the metal chosen by 3. 4. the user. Ask the user to enter a desired temperature; Determine the temperature difference between the initial temperature of the 5. 6. metal and the desired temperature; Determine the energy required to be removed from the metal; Determine the temperature difference between the initial temperature of the 7. 8. liquid and the desired temperature 9. Determine the mass of liquid required; 10. Determine the volume of liquid required. Thinking Like an Engneer 4h Edition %header Part 1 Clear CLC [M]=xls read ("cooling Metal',A:D); [Nl xlsread( Cooling Metal',A1:D1) MetalChoice -menu Choose One ,N); error 'You closed the menu' else N20; end MetalName-sprintf('Choose a mass for sf, NameChoice) Mchosen-menu( 'MetaLName, num2ceLL(M(MetalChoice,:)) if MetalName end Mass-M(MetalChoice, MetaName); [MassChoice, NameChoice, V] = function (F1); fprintf(['Metal Choice: %so.es ."Mass Choice : .03f [g] ' NameChoice (MetalChoice; error 'Terminate Volume Needed: \t\t 82E [gal]in,j,N(MetalChoice), M(MetalChoice),v); %%Part 2 function E1(Mass, Name)[Volume] clear clc xlsread( Cooling Metal, A:D) SHg Data12,2} Tg1-Datat2,4} Cl-strcmpi (Text (2:endName); SHmeatal Data(C+1,1); Tmetal-Data(C+1, Name); Fina IT= input ('Enter final ifTmetallStep 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