Search for question
Question

Problem 5: Assume you gathered the following table of temperature and pressure data in your laboratory for a 1 kg(=m) cylinder of nitrogen (standard atomic weight (Wa) of N2 is

28.014 g/mol) held at a constant volume of 10 m³: Write a MATLAB M-file that uses linear regression to find the value of the universal gas constant R in the ideal gas law: pV = nRT where p= pressure, V = volume, n= moles of gas, and T = temperature in °K. Note: number of moles n=mass/atomic weight, when used in correct units. The M-file must also compute the coefficient of determination (r?) for the linear fit to the data and the true relative percent error (ɛ) between the value of R you find and the standard value found in the literature.Turn in a copy of your M-file and a printout of the command window showing your results for R, r, and Et.

Fig: 1

Fig: 2

Fig: 3

Fig: 4

Fig: 5

Fig: 6

Fig: 7