TASK: Write a script that evaluates a formula for the density of water.
COMMENT: A formula for rho, the density of water in grams/cm^3, at a temperature t in degrees Celsius, is:
rho(t) = 0.99985308 + 6.32693 * 10-5 * t - 8.523829 * 10-6 * t2 + 6.943248 * 10-8 * t3 - 3.821216 * 10-10 * t4Evaluate this formula for temperatures t = 0, 4, 10, 20, and 40 degrees.
INSTRUCTIONS:
To see 16 digits of accuracy, start with format long Set t to 0 t = 0 Set rho to the formula for density, based on t: rho = 0.99985308 + 6.32693E-5 * t - ... Repeat this process, setting t to 4, 10, 20 and 40, and computing the corresponding value of rho in each case.For t = 20, the correct value of rho is 0.998203254784000
SUBMIT: Your work should be stored in a script file called "hw003.m". Your script file should begin with at least three comment lines:
% hw003.m % YOUR NAME % This script (describe what it does) % Add any comments here that you care to make.If this problem is part of an assignment, then submit it to Canvas.