3.5.5.1 Data

Description

The data(x1, x2, inc) function creates a dataset with an initial value of x1, a final value of x2, and an increment equal to inc. If x1 is set equal to x2, inc number of points with values equal to x1 are returned. If inc is omitted, inc = 1 is assumed.

Syntax

dataset data(double x1, double x2, double inc)

Parameter

x1

the beginning value of the returned dataset.

x2

the end value of the returned dataset.

inc

increment.

Return

Return a dataset with an initial value of x1, a final value of x2, and an increment equal to inc.

Examples

Example 1

The following function fills the first five rows of column A with the number 10.

col(A) = data(10, 10, 5);


Example 2

The following function fills column A with 100 numbers from 1 to 100, with an increment of one.

col(A) = data(1,100);


Example 3

If the length of the datasets in the columns of a worksheet varies from column to column, the wks.maxRows expression can be used in this function to produce a dataset equal in length to the longest existing dataset (in the active worksheet). The following function fills column A with row numbers from one to the end of the longest existing data column.

col(A) = data(1, wks.maxRows);

See Also:

{v1, v2, ...vn} (function),

Create (command),

Edit (command)