 Usage:  ynew = spline(x,y,{xnew,lambda,w})  
 
 Input:

  x                      n x 1 vector of the predictor variable. There should be 
                         at least 4 distinct x values. The x values must be ordered 
                         x[1] <= x[2] <= ...<= x[n]. 
                         
  y                      n x 1 vector of the regressor variable. This vector 
                         must be of the same dimensionality as x. 
                         
  xnew                   m x 1 vector of the new ordered points at which the cubic 
                         spline must be computed xnew[1] <= xnew[2] <= ...<= xnew[n]. 
                         The default value is xnew = x. 
                         
  lambda                 a scalar that controls the choice of a smoothing 
                         method. If lambda = 0 the interpolating 
                         cubic spline is computed. In the case of lambda > 0 
                         the ordinary cubic smoothing spline with the smoothing 
                         parameter lambda is computed. 
                         If lambda < 0 then the smoothing parameter is chosen 
                         based on the Generalized Cross Validation method. The 
                         default value is -1. 
                         
  w                      n x 1 vector of the weights. The default value is w[i]=1. 
                         
 Output:

  ynew                   m x 1 vector that contains the smoothed data. 
                         
--------------------------------------------------------------
(C) MD*TECH Method and Data Technologies, 17.8.2000
