function yp = Lagrange_IP (x, y, xp) end Set the intial value of interpolated value yp = 0; Loop for each value of x vec
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
function yp = Lagrange_IP (x, y, xp) end Set the intial value of interpolated value yp = 0; Loop for each value of x vec
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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!