Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB Problem 3 (5 points) : Interpolation Consider a gas in a piston-cylinder device in which the temperature is held constant. As the volume of
MATLAB
Problem 3 (5 points) : Interpolation Consider a gas in a piston-cylinder device in which the temperature is held constant. As the volume of the device was changed, the pressure was measured. The volume and pressure values are reported in the following table. Volume (m) 1 2 3 4 5 6 Pressure (kPa) when I = 300K 2494 1247 831 623 499 416 a. Interpolate the data using a polynomial that goes through all the data points. (Make sure to display the coefficients you get for the interpolating polynomial.) b. Plot the data points and the interpolating polynomial through all the data points over the range of 1 to 6 for the volume on a single figure. Use red squares to represent the data points and a black dashed line for the polynomial. c. Plot the spline interpolation through the same data points on the same figure as part b. Use a cyan solid line for the spline. d. Estimate the pressure when the volume is 2.8 min three ways: i. using your polynomial interpolation through all the data points ii. using a linear interpolation (through the two nearest data points) iii. using a spline interpolation Use a disp command to display your results along with text that makes it clear which technique was used to produce each estimate. To receive full credit for part ii, you must use the polyfit command (and may not use interp1 )Step 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