Write a matlab script to try fitting a 1st 2nd and 3rd


Problem:

The following data represents the volume of ice needed to adequately chill a given volume of hot water. (The data can be found in HotWater.txt and Ice.txt on Blackboard - use dlmread to read the two vectors in.)

Volume of hot water (cups)

0.62

 0.84  1.41

...

3.16

 3.65

Volume of ice (cups)

5.95

 10.41  28.4

...

142.72

189

a) Write a Matlab script to try fitting a 1st, 2nd, and 3rd degree polynomial to the dataset described by volume of water vs. volume of ice. Use subplot to draw all three. Plot your dataset as points, and your fitted equation as a solid line in the domain 1 ≤ Vwater ≤ 5. Use a legend to identify the data points and the fitted equation.

b) Which degree do you think best represents the data? (Hint: how much ice is needed to chill 0 cups of hot water?)

c) Use your chosen degree polynomial to find and print the volume of ice needed to chill 1.5 cups of hot water.

Additional information: This question belongs to MATLAB software and discusses about application of MATLAB in mathematics to solve polynomials and to perform certain operations.

Answer is in MATLAB format

Solution Preview :

Prepared by a verified Expert
MATLAB Programming: Write a matlab script to try fitting a 1st 2nd and 3rd
Reference No:- TGS01372461

Now Priced at $35 (50% Discount)

Recommended (99%)

Rated (4.3/5)