Question
The following data define the sea-level concentration of dissolved oxygen for fresh water as a function of temperature: Write a MATLAB function (or functions) that
The following data define the sea-level concentration of dissolved oxygen for fresh water as a function of temperature:
Write a MATLAB function (or functions) that receives the given data as the input and automatically chooses an appropriate interval for interpolation with linear and quadratic polynomials. For a quadratic polynomial: consider two options - the first three points from the possible set that encloses the given point, and the second three points. The function should provide an interpolated value as the output. Use your function(s) to estimate o(10) and o(27) with linear interpolation and two options for a quadratic interpolation. Note that the exact result for o(27) is 7.986 mg/L. For o(27), compare the errors (true percent relative errors). Use Lagrange form of the interpolating polynomials in this problem.
T, C 0 16 24 32 40 o, mg/L 14.625 11.842 9.871 8.416 7.301 6.412Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started