Question: You are to write a program ( IN MATLAB ) that plots the volume of a gas as a function of temperature using the ideal

You are to write a program (IN MATLAB) that plots the volume of a gas as a function of temperature using the ideal gas law.
The user should define the low and high limits of temperature, pressure, and number of moles of gas. In
addition, the user should define the units of temperature, pressure, and number of moles using string variables.
Your program needs to check for the following errors in user input:
Incorrect units (use R=0.08206LatmmolK, so T must be in K,P in atm, and n in mol)
Pressure too low (negative values) or too high (where ideal gas law is too inaccurate). Use your engineering
judgment to decide what too high means for the ideal gas law
Impossible number of moles (negative values)
Unreasonable temperature range (too low a lower limit, too high a higher limit, low value higher than high
limit)
Your program should output an error message to help the user understand what data is incorrect so he or she
can fix the problem. Once you've completed your program, test it with different incorrect values to see if it
correctly responds.
 You are to write a program (IN MATLAB) that plots the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!