The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Heat capacity equation using a string command
Replies: 4   Last Post: Feb 24, 2014 9:59 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Lindsay B

Posts: 2
Registered: 2/23/14
Heat capacity equation using a string command
Posted: Feb 23, 2014 2:26 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

The temperature dependence of the heat capacity Cp of many gasses can be described in terms of a cubic equation : Cp=a+bT+cT^2+dT^4
Gas a b c d

SO2 38.91 3.904x10^-2 -3.105x10^-5 8.606x10^-9
SO3 48.5 9.188x10^-2 -8.540x10^-5 32.4x10^-9
O2 29.10 1.158x10^-2 -.6076x10^-5 1.311x 10^-9
N2 29 .00 2199x10^-2 -.5723x10^-5 -2.871 x 10^-9

Write a function that does the following:
-Requires user to enter the gas name as a string and the temperature as a number.
-If a temperature below 20C or above 300C is entered, have the function display a message that reads, "Temperature entered is outside the range. Temp must be between 20 and 300 deg C.'
-If the string for the gas is intered incorrectly or a gas that isn't listed in the table is entered, have the function display the following: "No data matches the gas you entered."
-When the temperature is given within the proper temperature range, calculate Cp for the correct gas using the polyval() command discussed in class.
-If the Cp is calculated, the output should be displayed as:
-"The Heat Capacity for (gas name) is (calculated heat capacity in J/(gmole*degC)."

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.