void staircase (x, y, xnew, ynew, npts, mode) CURVES.C Level 3
 
float *x, *y The input x and y vectors (dimension npts).
float *xnew, *ynew The output x and y vectors (dimension npts * 2).
int *npts The dimension of the input vectors. The dimension of 
the output vectors ( npts * 2) will be returned.
int mode = 0 jumps occur at the midpoints of an x interval.
 = 1 jumps occur at the first x.
 = 2 jumps occur at the second x.
 
This function transforms the input vectors into a staircase set of output vectors. The y value is held constant between 
x data points and jumps vertically between levels. The jump points are determined by the variable mode. The effect is as if a bar plot were drawn with touching bars, and the staircase is the curve of the bar tops.