Spline Calculation: Excel

(x=2 to 4, h=2): a = 3 b = (2-3)/2 - 2/6*(2*(-1.92857) + 1.285714) = -0.5 - (1/3) (-3.85714 + 1.285714) = -0.5 - (1/3) (-2.57143) = -0.5 + 0.85714 = 0.35714 c = -1.92857/2 = -0.964285 d = (1.285714 - (-1.92857))/(6*2) = (3.214284)/12 = 0.267857

(x=4 to 7, h=3): a = 2 b = (5-2)/3 - 3/6*(2 1.285714 + 0) = 1 - 0.5 (2.571428) = 1 - 1.285714 = -0.285714 c = 1.285714/2 = 0.642857 d = (0 - 1.285714)/(6*3) = -1.285714/18 = -0.0714286 Step 5: Interpolate New x Values For any new x, determine the correct interval, then: spline calculation excel

Solve in Excel: Use and MMULT or manual algebra. (x=2 to 4, h=2): a = 3 b = (2-3)/2 - 2/6*(2*(-1

Manual solution: From first: z2 = (-9 - 2*z3)/6 Sub into second: 2*[(-9 - 2*z3)/6] + 10*z3 = 9 → (-18 - 4*z3)/6 + 10*z3 = 9 → -3 - (2/3)z3 + 10*z3 = 9 → (28/3)z3 = 12 → z3 = 9/7 ≈ 1.285714 Then z2 = (-9 - 2*(9/7))/6 = (-9 - 18/7)/6 = (-81/7)/6 = -81/42 = -27/14 ≈ -1.92857 (x=2 to 4

Leave a Reply