Question: MATLAB question: Temperature can be converted from Celsius (degree C) and Fahrenheit (degree F) to Kelvin (K) by using the following relation: T(K) = T(degree
MATLAB question:

Temperature can be converted from Celsius (degree C) and Fahrenheit (degree F) to Kelvin (K) by using the following relation: T(K) = T(degree C) + 273.15, T(K) = 5/9 *(T(degree F) + 459.67). (a) Create a 2-element cell array of anonymous functions to define the conversions above. The anonymous function should have a function handle named K. The first anonymous function should have the input argument C and an expression to convert temperature from C to K. The second anonymous function has the input argument F and an expression to covert temperature from F to K. Set p3a = K. (b) Convert 20 degree C to Kelvin and put the answer in p3b. (c) Convert 90 degree F to Kelvin and put the answer in p3c. The ideal gas law is given by: P V = n R T where P is pressure in atm, V is volume in liter, n is number of moles. R is ideal gas constant and T is temperature in Kelvin. For the following exercise, set R to be 0.08206 L atm mol^-l K^-l. (d) Create an anonymous function to relate pressure P to other variables in the ideal gas law. The function should have a function handle named P and 3 input arguments (n, T, V). Set p3d = P. (e) An 0.12 mol of solid CO_2 is put in an empty sealed 4.0 1 container at a temperature of 27 degree C. When all the solid CO_2 becomes gas, what is the pressure in the container? Set the answer to p3e. (f) An 0.12 mol of solid CO_2 is put in an empty sealed 4.0 1 container at a temperature of 90 degree F. When all the solid CO_2 becomes gas, what is the pressure in the container? Set the answer to p3f
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
