Data Creation with a Data List

The data list is useful for assigning values to worksheet columns or loose datasets. Creating a data list is achieved with any of the three following syntax structures:

Syntax

Create a loose dataset or column of literal values:

dataset datasetName = {v1, v2, ... vn};
col(colNameOrIndex) = {v1, v2, ... vn};


Create a loose dataset or column with a range of values; from a minimum v1 to a maximum vn, with the increment equal to 1:

dataset datasetName = {v1:vn};
col(colNameOrIndex) = {v1:vn};


Create a loose dataset or column with a range of values; from a minimum v1 to a maximum vn, with the increment equal to vstep:

dataset datasetName = {v1:vstep:vn};
col(colNameOrIndex) = {v1:vstep:vn};

 

When you use notation {v1:vstep:vn}, with system variable @DET, you can decide to use specified value vn or last calculated value as end value of range.

Examples

In the following example, the first six elements in column A are assigned the given values. If column A had more than six elements, only the first six elements would be changed.

col(A)={1, 2, 4, 5, 12, 13};

The next example assigns to the first 100 rows of column 4 (in the active worksheet) the values 1, 2, 3, ... 100:

col(4)={1:100};

Below, column 4 (of Book 2, Sheet 3) is assigned the values 0.010, 0.011, 0.012, ... 0.020:

range rr = [Book2]Sheet3!Col(4);
rr = {0.01:0.001:0.02};