run matlab and show matlab file
7c. only
algorithm 3.5

7. Construct the clamped cubic spline using the data of Exercise 3 and the fact that a. f?(8.3)=1.116256 and f?(8.6)=1.151762. b. f?(0.8)=2.1691753 and f?(1.0)=2.0466965. c. f?(?0.5)=0.7510000 and f?(0)=4.0020000. d. f?(0.1)=3.58502082 and f?(0.4)=2.16529366.
c.
To construct the cubic spline interpolant S for the function f defined at the numbers x0?<x1?<?<xn?, satisfying S?(x0?)=f?(x0?) and S?(xn?)=f?(xn?) : INPUT n;x0?,x1?,…,xn?;a0?=f(x0?),a1?=f(x1?),…,an?=f(xn?);FPO=f?(x0?); FPN=f?(xn?). OUTPUT aj?,bj?,cj?,dj? for j=0,1,…,n?1. (Note: S(x)=Sj?(x)=aj?+bj?(x?xj?)+cj?(x?xj?)2+dj?(x?xj?)3 for xj??x?xj+1?.) Step 1 For i=0,1,…,n?1 set hi?=xi+1??xi?. Step 2 Set ?0?=3(a1??a0?)/h0??3FPO; ?n?=3FPN?3(an??an?1?)/hn?1?. Step 3 For i=1,2,…,n?1 set?i?=hi?3?(ai+1??ai?)?hi?1?3?(ai??ai?1?). Step 4 Set l0?=2h0?: (Steps 4, 5, and 6 and part of Step 7 solve a tridiagonal linear system using a method described in Algorithm 6.7.) ?0?=0.5;z0?=?0?/l0?.? Step 5 For i=1,2,…,n?1 set?i?zi??li?=2(xi+1??xi?1?)?hi?1??i?1?;=hi?/li?=(?i??hi?1zi?1??)/li?.?