Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB program 6. You are construeting a program to convert the specific heat of common materials from units of calories per gram degree Celsius to

MATLAB program image text in transcribed
6. You are construeting a program to convert the specific heat of common materials from units of calories per gram degree Celsius to units of British thermal units per pound-mass degree Fahrenheit. A file named Spee? [ ?cllea. mal is available online. Place this file into your MATLAB directory. Following the housekeeping commands, use the load command to load the contents of this file into your workspace load Specifichoal mat ) 1. This will place the variable SpHoat into your workspace. Sphoat is a two column cell array containing the following initial compounds and associated specific heat values: Aluminum, 0.22; Calcium, 0.15 Gold, 0.031: Silicon, 0.17; Zinc, 0.093 Instruct the user to select a material from a menu or enter a new material name [see sample menu shownl. If the user closes the menu, issue a warning message and redisplay the menu until the user makes a correct choice MEND Choose a meta Gold Slicon Znc If the user chooses to enter a new material, the user should be prompted to enter the material name and the specific heat of the material in units of calories per gram degree Celsius. This new material should be stored in a new row at the bottom of the cell array with the original data. Once the new material has been entered, save the revised cell array variable to " Speciticlleat.mat .[Refer to the documentation files on the save command if you do not know how to do this.J Note that if you run the program again after this that Splleat will contain the newly added data when you load the variable from Speciticleat.mat For the compound either chosen or entered by the user, convert the specific heat value to units of British thermal units per pound-mass degree Fahrenheit. Display in the Command Window both values similar to the output shown below, using three decimal places for the values. The specitic heat of Gold in 0.031 cal/ (g deg C)x.xxx TU/ (lb dog t Ask the user if they wish to run the program again, using a menu. Repeat the program until the user chooses to terminate the program Test Case and Sample Output Enter a metal: Braas Enter 0.09 the specitic heat capacity ot Brass in cal/tg deg cy BTO/(LD deg E) 6. You are construeting a program to convert the specific heat of common materials from units of calories per gram degree Celsius to units of British thermal units per pound-mass degree Fahrenheit. A file named Spee? [ ?cllea. mal is available online. Place this file into your MATLAB directory. Following the housekeeping commands, use the load command to load the contents of this file into your workspace load Specifichoal mat ) 1. This will place the variable SpHoat into your workspace. Sphoat is a two column cell array containing the following initial compounds and associated specific heat values: Aluminum, 0.22; Calcium, 0.15 Gold, 0.031: Silicon, 0.17; Zinc, 0.093 Instruct the user to select a material from a menu or enter a new material name [see sample menu shownl. If the user closes the menu, issue a warning message and redisplay the menu until the user makes a correct choice MEND Choose a meta Gold Slicon Znc If the user chooses to enter a new material, the user should be prompted to enter the material name and the specific heat of the material in units of calories per gram degree Celsius. This new material should be stored in a new row at the bottom of the cell array with the original data. Once the new material has been entered, save the revised cell array variable to " Speciticlleat.mat .[Refer to the documentation files on the save command if you do not know how to do this.J Note that if you run the program again after this that Splleat will contain the newly added data when you load the variable from Speciticleat.mat For the compound either chosen or entered by the user, convert the specific heat value to units of British thermal units per pound-mass degree Fahrenheit. Display in the Command Window both values similar to the output shown below, using three decimal places for the values. The specitic heat of Gold in 0.031 cal/ (g deg C)x.xxx TU/ (lb dog t Ask the user if they wish to run the program again, using a menu. Repeat the program until the user chooses to terminate the program Test Case and Sample Output Enter a metal: Braas Enter 0.09 the specitic heat capacity ot Brass in cal/tg deg cy BTO/(LD deg E)

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_2

Step: 3

blur-text-image_3

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 And Expert Systems Applications 15th International Conference Dexa 2004 Zaragoza Spain August 30 September 3 2004 Proceedings Lncs 3180

Authors: Fernando Galindo ,Makoto Takizawa ,Roland Traunmuller

2004th Edition

3540229361, 978-3540229360

More Books

Students also viewed these Databases questions