How do I input equations in matlab ?

1 view (last 30 days)
dillon De Melo
dillon De Melo on 10 Aug 2013
My task is to write a matlab program that takes altitude as an input from the user and returns the pressure, temperature and density at that altitude. I have defined variables with corresponding data, for example, ( in SI units ) T_SI=288.16 which is Temperature set to 288.16 Kelvin. I have data for altitude( h_SI ) , pressure ( p_SI ) and density ( rho_SI). My problem lies with inputing/creating this equation :
( P.alt/P.sL) = (T.alt/T.sL)^5.256
Where the subscript sl standards for sea-level and alt is the value at the required altitude h.
Ive been told that The formulas relate the values of pressure and density at altitude relative to the sea-level values. As they are ratios, they are dimensionless formulas (so long as you use consistent units for a given quantity)
The temperature lapse rate is 6.51E-3 °Kelvin/m (SI Units) or 3.57E-3 °Rankine/ft (U.S.).
  1 Comment
Walter Roberson
Walter Roberson on 10 Aug 2013
In the equation ( P.alt/P.sL) = (T.alt/T.sL)^5.256 which of the values are known? Which of the values are not inherently known but can be calculated from some other equation involving only known values? Substitute in the equation for that unknown value. If you keep going along this line, eventually you will arrive at an equation that has the input value on one of the sides and a value to be calculated on the other. At that point you can solve for one in terms of the other.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!