
Contents |
Sparse Gridding
1. xyz_sparse iz:=Col(3) rows:=3 cols:=5;
2. xyz_sparse iz:=Col(3) rows:=3 cols:=5 om:=[MyMatrix]Sheet1!Mat(1);
| Display Name | Variable Name | I/O and Type | Default Value | Description |
|---|---|---|---|---|
| Input | iz |
Input XYZRange | |
Specifies the input XYZ range. |
| Rows | rows |
Input int | |
Rows in the output matrix. |
| Columns | cols |
Input int | |
Columns in the output matrix. |
| Output Matrix | om |
Output MatrixObject | |
The output matrix. See the syntax here. |
The Sparse XYZ worksheet to matrix conversion is similar to the Regular XYZ conversion (i.e. X and Y data values must be regularly spaced), except that in the case of the Sparse conversion, missing XY pairs are acceptable. Using proper X and Y step setting, sparse method will fill the value in the grid nodes like:
After conversion, Origin will generate the following matrix:
With the sparse matrix, you can create a 3D plot with Z values plotted only at select XY values, as in this 3D bar plot:
1. Import the file \Samples\Matrix Conversion and Gridding\Sparse.dat.
2. Type xyz_sparse iz: = Col(3) rows: = 3 cols: = 5 in the command window.
For more examples, please refer to XF Script Dialog (press F11).
xyz_regular, xyz_renka, xyz_renka_nag, xyz_shep, xyz_shep_nag, xyz_tps