OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

reducerows

Contents

Menu Information

Reduce Data by Skipping

Brief Information

Reduce every N points of data with basic statistics

Additional Information

Minimum Origin Version Required: 8.1 SR0

Command Line Usage

reducerows npts:=3 method:=first

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input irng

Input

Range

<active>
Specifies the input data range.
Number of Points npts

Input

int

5
Specifies a number n. Then every n data points in the input range are merged into one data point.
Merge by method

Input

int

0
Specifies the value with into a group of data points are merged.

Option list:

  • first:First Point
    Merges the data points in each group into the data point corresponding to the minimum row number in this group.
  • last:Last Point
    Merges the data points in each group into the data point corresponding to the maximum row number in this group.
  • ave:Average
    Merges the data points in each group into the average of these data points.
  • min:Min
    Merges the data points in each group into the minimum value of these data points.
  • max:Max
    Merges the data points in each group into the maximum value of these data points.
  • sum:Sum
    Merges the data points in each group into the sum of these data points.
  • sd:SD
    Merges the data points in each group into the standard derivation of these data points.
Output rd

Output

ReportData

[<input>]<new>
Specifies the output range.

Description

The reducedrows is used to remove every N row of data. And replace those rows with basic statistics data.

Examples

The following example shows you how to reduce several rows of data at one time. Suppose there are eight columns in an Origin workbook. Then perform the following on the workbook

  1. Highlight all columns. Right-click and then select Set as: XY XY from the short-cut menu.
  2. Select Plot: Multi-Curve: 4 Panel from the Origin menu to create a graph.
    Image:Reduce1.png
  3. Make the workbook active. Notice that all the columns are still highlighted. Enter reducerows -d in the Command Window to open the dialog box of the reduce X-Function.
  4. Set Number of Data Points to 5.
  5. Choose First Point with the Merge by drop-down list.
  6. Enter [<new>]<new> after Output.
    Image:Reducerows-1.png
  7. Click the OK button. You will see the results in a new workbook.
  8. Select Plot: Multi-Curve: 4 Panel from the Origin menu to create a graph.
    Image:Reduce3.png

For more examples, please refer to XF Script Dialog (press F11).

Related X-Functions

stats, reducexy, reducedup