I've got a few questions related to fitting cubic splines to data.

1.) how is it done? I know you can do it in matlab but how is it done in matlab? In other words i'm interested in how matlab as a program does it and not the process of doing them in matlab as you would find in the matlab manual.

2.) what is the implication of having 2 or 3 or more points in your data that are on the same level... how does a cubic spline fit over those?