
Contents |
Average or concatenate multiple curves
| Display Name | Variable Name | I/O and Type | Default Value | Description |
|---|---|---|---|---|
| Input | iy |
Input XYRange | | Specifies multiple curves to be averaged or concatenated. |
| Method | method |
Input int | | Average Method
Option list:
|
| Averaged X | avex |
Input int | | It is available only when Ave is selected for Method. It can specify the method to compute the X values of the averaged curve.
Option list:
|
| Tolerance for Common X Values | toler |
Input double | | It is available only when ave is selected for method and same is selected for avex. It is used to check if the X values of input curves are the same. |
| Number of Points | npts |
Input int | | It is available when ave is selected for method and aveX is not set to same. It specifies the number of points of the interpolated curves. In the dialog box, it computes a number automatically if the nearby Auto checkbox is enabled. You can also disable the Auto checkbox and specify the values by yourself. |
| X Minimum | xmin |
Input double | | It is editable only when custom is selected for avex. It specifies the minimum X value of the averaged curve. In the dialog box, it computes a number automatically if the nearby Auto checkbox is enabled. You can also disable the Auto checkbox and specify the values by yourself. This variable is read-only if Common X Range or Full X Range is selected for Averaged X. |
| X Maximum | xmax |
Input double | | It is editable only when custom is selected for avex. It specifies the maximum X value of the averaged curve. In the dialog box, it computes a number automatically if the nearby Auto checkbox is enabled. You can also disable the Auto checkbox and specify the values by yourself. This varialbe is read-only if Common X Range or Full X Range is selected for Averaged X. |
| Interpolate | interp |
Input int | | It is available only when avex is not set to same. It specifies the method to interpolate the X values before averaging the input curves.
Option list:
|
| Sort X | sortx |
Input int | | It is available only when concatenate is selected for method. It specifies the method to sort the X values of the averaged curve. Y values will be reordered accordingly.
Option list:
|
| X | x |
Output vector | | Specifies the column for output averaged X values. |
| Y | y |
Output vector | | Specifies the column for output averaged Y values. |
| Std Dev | sd |
Output vector | | This variable is available only when method is set to ave. It specifies whether or not to compute the standard deviations of the averaged curve. |
| Std Err | se |
Output vector | | This variable is available only when method is set to ave. It specifies whether or not to compute the standard errors of the averaged curve. |
| N | n |
Output vector | | This variable is available only when the method is set to ave. It specifies whether or not to compute the counts of input data points that correspond to each averaged X value. |
This function calculates the average of the input curves or concatenates them, and then output the X, Y value as vectors, respectively.
If the Method variable is set to Concatenate, the input ranges will be joined to form a larger data set. Otherwise, the averaged Y values for the input curves will be computed.
The interpolation is performed on all the input curves' x values to form an uniform X range for the averaged curve. Or, you can simply join the x values of all the input curves to form a larger data set. In this case, you can specify a tolerance and the minor differences in x values are ignored.
If x values of input curves are not monotonic, the curves are sorted first and then Origin averages these monotonic curves. For average computation, the standard deviations, standard errors and number of points that correspond to each X value can be also outputted.
The following script command is used to average two curves data in the active worksheet using linear interpolation on the X values.
averagexy iy:=((col(1),col(2)),(col(3), col(4))) method:=ave avex:=common x:=<new> y:= <new>;
Then two columns are added to the input worksheet. One stores the x values and other stores the y values of the averaged curve.
When the Method variable is set to Concatenate, all the input ranges are simply joined together. Otherwise, average Y values are computed for the input curves. For computing the X values of the averaged curve, this X-Function provides five methods.
For more information about the method of computing the x values, please refer to the algorithm of avecurves.