Question: a) b) c) In this assessed question, you will write a function that does part of what Scipy's linear interpolation does. Write a function interpFrom2Pts(x1,x2,y1,
a)



b)

c)


In this assessed question, you will write a function that does part of what Scipy's linear interpolation does. Write a function interpFrom2Pts(x1,x2,y1, y2,xnew). The algorithm should use the general linear equation y = mx+b : 1. Find the gradient m using rise/run AY 4 XY 16 2. Find the y intercept b 3. Find the interpolated y value corresponding to the new input xnew Your function should follow the debuggability notes from this tute: 1. Return None on invalid inputs (including the case of extrapolation) 2. Your function may assume x1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
