Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 x1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started