Use the decimateFilter function to reduce a large, previously saved X–Y data object (a collection of ordered pairs) to a smaller, representative sample. The decimateFilter function is an anti-aliasing filter that selects points at a user-defined sampling frequency to produce a new X–Y data object.
The decimateFilter function requires two arguments: the name of the X–Y data object and the decimation factor, which is the factor by which the sampling rate is to be increased. The decimation factor must be an integer value greater than 1. A description of the optional arguments follows:
The ratio of the new sampling rate to the cut-off frequency used by the decimateFilter function prior to decimation (cutoffFactor). The cut-off factor must be an integer value of 2 or more.
A symbolic constant that specifies the interpolation scheme (interpolation). Valid values for this argument are QUADRATIC, specifying a Lagrange second-order interpolation scheme; CUBIC_SPLINE, specifying a cubic spline interpolation scheme; and LINEAR, specifying a linear interpolation scheme. The default value is QUADRATIC.
The slope of the raw data curve leading up to the first data point (startslope). This argument's default value is 0.0 (for a level slope), and it is used only when interpolation=CUBIC_SPLINE.
The slope of the raw data curve continuing past the final data point (endslope). This argument's default value is 0.0 (for a level slope), and it is used only when interpolation=CUBIC_SPLINE.
To reduce the sample size of an X–Y data object:
Locate the Operate on XY Data dialog box.
From the main menu bar, select ToolsXY DataCreate. Click Operate on XY data in the dialog box that appears; then click Continue. The Operate on XY Data dialog box appears.
From the Operators listed, click decimateFilter(X,I).
The decimateFilter function appears in the expression window.
From the XY Data choices, click the name of the X–Y data object on which to operate and click Add to Expression. You can choose from all X–Y data objects previously saved within this session (listed alphabetically in the XY Data field).
The X–Y data object name appears within the decimateFilter function parentheses in the expression window.
Position the cursor in the expression window before the second comma, and type in a value for the decimation factor.
To continue to build your expression, position the cursor in the expression window and type in or select the functions, operators, and X–Y data you want to include.
To evaluate and display your expression, click Plot Expression.
To save your new X–Y data object, click Save As and then provide a name in the dialog box that appears.
Saving your data object makes it available for future operations within this session and for inclusion in X–Y plots containing multiple data objects.
When you are finished, click Cancel to close the dialog box.