points
Array of dimension npts, giving the X and Y axis values of the points that the square wave is fitted to
pos
Flag controlling the square wave interpolation. The value determines the position of the change in height from one point to the next
= GCURRENT
Change occurs at current point held in points.x and points.y
= GHALFWAY
Change occurs half way between current and next point
= GNEXT
Change occurs at next point
xory
The direction in which the square wave is fitted to the data set. The value of xory represents the axis to which the height change in the square wave is perpendicular to:
= GXAXIS
X axis
= GYAXIS
Y axis
Description
The routine ggAddSquareWave() takes the points held in the points array and fits a square wave to them. The square wave passes through all the given points. The changes in height can occur at one of three positions about the given points, depending on the value of pos.