Question: Python: 1) In a numpy array named y0, sample () on the interval above with 10 evenly spaced points. Perform a Lagrange polynomial fit using

Python:
1) In a numpy array named y0, sample () on the interval above with 10 evenly spaced points. Perform a Lagrange polynomial fit using y0 as the knots. The outcome of your interpolation should be an array storing the coefficients of the polynomial coeff (ordered with largest power first).
2) Create one figure with two subplots; one subplot of the interpolant p10(0) alongside () using 100 evaluation points, [1,1], and another subplot of the error, |()p10()| in this approximation. Label your figure appropriately.
3) Create your own function, named myVan(x) which takes a 1-dimensional numpy array as input and returns the Vandermonde matrix, i.e. equivalent to np.vander.
f(x)=tanh2(x)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
