function yp = Lagrange_IP (x, y, xp) end Set the intial value of interpolated value yp = 0; Loop for each value of x vec
Posted: Tue May 24, 2022 7:49 am
function yp = Lagrange_IP (x, y, xp) end Set the intial value of interpolated value yp = 0; Loop for each value of x vector for i=1: length (x) Used to find the interpolated value Р <= 1; Loop for each value of x vector for j = 1 : length (x) If the 1 and 3 both ae not equal means not same point if i = J Compute the interpolated value for 1 & 3 - p - p * (xp x(j))/(x (1) - X (3)); end end Compute the interpolated value for ith value of y ур - ур + p *y (1); end I