a) interp1. Find the y values that correspond to the xi values using % linear in
ID: 3567322 • Letter: A
Question
a) interp1. Find the y values that correspond to the xi values using % linear interpolation from the vectors x and y. (A)
b) spline. Find the y values that correspond to the xi values using % the spline method from the vectors x and y. (B)
c) polyfit. Find the coefficients of the fifth order polynomial that best % fits the points represented by vectors x and y. (C)
d) polyval. Evaluate the polynomial found in part c at the points in the % vector xi. (D)
e) diff. Approximate the derivative, dy/dx, for the vectors x and y. (E)
f) Approximate the second derivative for the vectors x and y. The % x vector should consist of all except for the last index of the original % x vector used in the previous part. (F)
g) cumsum. Find the cumulative sum of the elements in x. (G)
h) trapz. Find the area under the curve represented by x and y by using the trapzoidal method of approximation. (H)
I) cumtrapz. Find the cumulative area under the curve represented by x and y by using the trapzoidal method of approximation. (I)
Explanation / Answer
1.
2.
3.
4.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.