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)

a) b) c) In this assessed question, you will write a functionthat does part of what Scipy's linear interpolation does. Write a functioninterpFrom2Pts(x1,x2,y1, y2,xnew). The algorithm should use the general linear equation y =

b)

mx+b : 1. Find the gradient m using rise/run AY 4 XY

16 2. Find the y intercept b 3. Find the interpolated yc)

value corresponding to the new input xnew Your function should follow thedebuggability notes from this tute: 1. Return None on invalid inputs (including

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

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!