- Function Yp Lagrange Ip X Y Xp End Set The Intial Value Of Interpolated Value Yp 0 Loop For Each Value Of X Vec 1 (61.14 KiB) Viewed 11 times
function yp = Lagrange_IP (x, y, xp) end Set the intial value of interpolated value yp = 0; Loop for each value of x vec
-
- Site Admin
- Posts: 899603
- 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