2.2.1.5 xyz_regular

Brief Information

Convert regularly spaced XYZ data to matrix

Command Line Usage

1. xyz_regular;

2. xyz_regular Col(3);

3. xyz_regular zi:=(1,2,3);

4. xyz_regular mo:=[MyMatrix]Sheet1;

Variables

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

Input

XYZRange

<active>

Specifies the input XYZ range.

Output Matrix om

Output

MatrixObject

<new>

Specifies the output destination matrix.

See the syntax here.

Description

In order for XYZ worksheet data to be classified as Regular, the XY data must meet the following requirements:

1. Each X value must have the same number of Y values and each Y value must have the same number of X values. And

2. Both the X and the Y data values must be equally spaced. To check for regularity, you canplot the XY data set as a line and symbol graph:

Xyz regular image10.gif

If your data satisfies the above criteria, you can convert your worksheet to a matrix using the Regular method and get a matrix filled with z values:

Xyz regular image11.gif

Examples

  • Code Sample
/*
This example shows how convert worksheet data into matrix by regular xyz gridding method.
The sample data is exe_path\Samples\Matrix Conversion and Gridding\XYZ Regular.dat.
1. Load data to a new created workbook.
2. Regular xyz gridding conversion.
*/
// Get sample data
fn$ = system.path.program$ + "Samples\Matrix Conversion and Gridding\XYZ Regular.dat";
newbook;
impASC fn$;
// Set the third column as Z column
wks.col3.type = 6;

// Convert worksheet data into matrix by regular xyz gridding method
xyz_regular 3;

Related X-Functions

xyz_renka, xyz_renka_nag, xyz_shep, xyz_shep_nag, xyz_sparse, xyz_tps


Keywords:worksheet, gridding