Question: Ask the user to enter the material name and specific heat information that they would like to use. You may assume that the user will
Ask the user to enter the material name and specific heat information that they would like to use. You may assume that the user will choose one of the materials in Table A. Both these items should be stored in a 1 X 2 cell array. You may use more than one line to accomplish this task. write code in MatLab
Ask the user to enter a 1 X 2 vector containing first the mass in grams [g] and second the initial temperature in degrees Celsius [0C] of the material the user entered in the first step.
Calculate the thermal energy, in Joules [J], that must be removed from the material and then determine the volume of glycerol needed, in units of gallons [gal], to cool the rod to 50 0C. You may use the properties of glycerol listed in Table B.
Write an output statement or set of statements to the user similar to the final output shown below. The numerical formats should match exactly as shown. Please note the bold information is what the user will enter.
Output format:
Enter name of the material: Cadmium
Enter the specific heat [J/(kg K)]: 231
Enter the mass [g] and initial temperature [deg C] of the material as a 1 x 2 matrix [m T]: [4000 300]
For the 4.0 kg Cadmium rod with an initial temperature of 300 deg C
Energy removed [J] 2.3e+05
Glycerol Volume [gal] 0.81
Please do NOT attempt to write functions.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
