Question: Please use Python and comment well 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 t[s] 0 y [m] 0 0.58 0.95 0.95 0.59

Please use Python and comment well  Please use Python and comment well 0.1 0.2 0.3 0.4 0.5

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 t[s] 0 y [m] 0 0.58 0.95 0.95 0.59 0.01 -0.59 -0.95 -0.95 -0.59 -0.01 You need to determine the value of y at t = 0.03 s and t = 0.25 s. You choose to do this by interpolating this data on a new time axis, resampling from dt = 0.1 (as it is currently in the table above) to dt = 0.001. Write a Python program to interpolate this data using: i) Polynomial interpolation using Lagrange's Method ii) Piece-wise linear interpolation Polynomial interpolation using Vandermonde matrix. Your Python program must output two things: 1. A single figure which shows a) the raw data (black circles), b) the polynomial interpolation (green line), c) piece-wise linear interpolation (blue line) and d) the Vandermonde interpolation (red line). Include a legend and a grid. 2. Print statements for the value of y at t = 0.04 s and t = 0.25 s using each of the three interpolation schemes, printed to 3 decimal places in accuracy. 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 t[s] 0 y [m] 0 0.58 0.95 0.95 0.59 0.01 -0.59 -0.95 -0.95 -0.59 -0.01 You need to determine the value of y at t = 0.03 s and t = 0.25 s. You choose to do this by interpolating this data on a new time axis, resampling from dt = 0.1 (as it is currently in the table above) to dt = 0.001. Write a Python program to interpolate this data using: i) Polynomial interpolation using Lagrange's Method ii) Piece-wise linear interpolation Polynomial interpolation using Vandermonde matrix. Your Python program must output two things: 1. A single figure which shows a) the raw data (black circles), b) the polynomial interpolation (green line), c) piece-wise linear interpolation (blue line) and d) the Vandermonde interpolation (red line). Include a legend and a grid. 2. Print statements for the value of y at t = 0.04 s and t = 0.25 s using each of the three interpolation schemes, printed to 3 decimal places in accuracy

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!