Matlab code to smoothing functional data