Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve this using python / Jupyter Notebook Input: A set of values y 1 , y 2 , cdots, y n and the corresponding coordinate

Solve this using python/Jupyter Notebook
Input: A set of values y1,y2,cdots,yn and the corresponding
coordinate vectors x1,x2,cdots,xn.
Input: A coordinate vector of a point of interest cj, for which an
estimated value will be computed.
Output: The interpolated value hat(y)jR, computed for the location cj.
nlarr the number of input points;
for all input points iin{1,2,cdots,n} do
di,jlarr Euclidean distance between xi and cj;
for all input points iin{1,2,cdots,n} do
wi,jlarrdi,j-2k=1ndk,j-2
6hat(y)jIDWlarri=1nwi,jyi
7hat(y)jRlarrhat(y)jIDW+ni=1nyi-nhat(y)jIDWn2-i=1ndi,j-2i=1ndi,j2
return hat(y)jR
Note that xn represents a coordinate vector, i.e.,x=x in 2D or y=f(x), and x=(x1,x2) in 3D or y=f(x1,x2).
Part A
Demonstrate how the algorithm described above works for the following set of coordinates (x,Y)
x=[0.00.050.010.20.80.850.91.0],Y=[0.00.71.01.00.30.050.11.0]
and show that the interpolated values for x={0.02,0.18,0.4,0.6,0.89} are y={0.7925,0.9848,0.9959,0.1680,0.1057} respectively.
For Part A show a detailed solution. A step by step process, do not use a 'def' function
yet.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions