% hw003.m
% John Burkardt
% Given a formula for rho, the density of water as a function of
% temperature, evaluate this formula for several cases.
%
format long

t = 0.0
rho = 0.99985308 + 6.32693E-5 * t - 8.523829E-6 * t^2+ 6.943248E-8 * t^3 - 3.821216E-10 * t^4
t = 4.0
rho = 0.99985308 + 6.32693E-5 * t - 8.523829E-6 * t^2+ 6.943248E-8 * t^3 - 3.821216E-10 * t^4
t = 10.0
rho = 0.99985308 + 6.32693E-5 * t - 8.523829E-6 * t^2+ 6.943248E-8 * t^3 - 3.821216E-10 * t^4
t = 20.0
rho = 0.99985308 + 6.32693E-5 * t - 8.523829E-6 * t^2+ 6.943248E-8 * t^3 - 3.821216E-10 * t^4
t = 40.0
rho = 0.99985308 + 6.32693E-5 * t - 8.523829E-6 * t^2+ 6.943248E-8 * t^3 - 3.821216E-10 * t^4
