function ncs_test ( )

  fprintf ( 1, '\n' );
  fprintf ( 1, 'ncs_test:\n' );
  fprintf ( 1, '  Test ncs()\n' );

  n = 11;
  x_int = linspace ( 0.0, 2.0, n );
  y_int = humps_fun ( x_int );
  
  x = linspace ( 0.0, 2.0, 101 );
  y_ncs = ncs ( x_int, y_int, x );
  y_exact = humps_fun ( x );

  plot ( x_int, y_int, 'ko', x, y_ncs, 'r-', x, y_exact, 'b-' );
  grid ( 'on' );
  title ( 'Natural cubic spline interpolant to humps data' )
  filename = 'ncs_test.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  pause ( 5 )

  return
end
  
