title: Calculate matrix in cubic spline interpolation
body: <p>I read the article on <a href="https://www.value-at-risk.net/cubic-spline-interpolation/" rel="nofollow noreferrer">https://www.value-at-risk.net/cubic-spline-interpolation/</a></p>
  
  <p>I understand all but I don't know how I can get the values for the matrix:</p>
  
  <p><a href="https://i.stack.imgur.com/tynTh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tynTh.png" alt="enter image description here"></a></p>
  
  <p>I know that there is something like hi = hi+1 - hi</p>
  
  <p>I visited several websites, read different explenations, but I never found out how exactly I come to this values in the matrix.</p>