Problem 56328. Molar Air Density from Temperature and Pressure
The molar density of air can be found from the Temperature and Pressure using the ideal gas law.
where the Molar density STP :
from Avagadro's number:
and Loschmidt’s number STP:
And STP Temperature and Pressure:
Write a function that finds the density of air in moles per cubic centimeter for input temperature (in Kelvin) and pressure (in mb). This function should allow: a single input temperature and pressure pair, a single temperature and vector of pressures, a single pressure and and a vector of temperatures, a vector of pressures and a vector of temperatures of the same size (interpreted as pairs). Return -1 if a P and T are unequal vector dimensions greater than 1.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers186
Suggested Problems
-
Flip the main diagonal of a matrix
828 Solvers
-
Fix the last element of a cell array
1541 Solvers
-
Find the sides of an isosceles triangle when given its area and height from its base to apex
1960 Solvers
-
164 Solvers
-
Where the Four Corners Am I? (Vectorized)
95 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!