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

xyz_sparse

Contents

Brief Information

Sparse Gridding

Command Line Usage

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);

Variables

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

Input

XYZRange

<active>

Specifies the input XYZ range.

Rows rows

Input

int

20

Rows in the output matrix.

Columns cols

Input

int

20

Columns in the output matrix.

Output Matrix om

Output

MatrixObject

<new>

The output matrix.

See the syntax here.

Description

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:

Image:xyz_sparse_image7.gif

After conversion, Origin will generate the following matrix:

Image:xyz_sparse_image8.gif

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:

Image:xyz_sparse_image9.gif

Examples

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).

Related X-Functions

xyz_regular, xyz_renka, xyz_renka_nag, xyz_shep, xyz_shep_nag, xyz_tps