generatedataarray(
COUNT
,
FORMULA
)

The generatedataarray( function generates a new data array based on a formula (see Data Arrays and Text Arrays).


Parameters

This function has two parameters:

count – the number of elements to be created in the new array.

formula – the formula used to generate each element of the array. The formula can include the seq( function if the values need to be based on the element number. The entire formula must be enclosed in quotes (see Quotes).


Description

This function creates a new data array “from scratch.” It uses a formula to calculate the value of each array element. If all the elements have the same value, the formula can simply be a fixed value. This example creates a six element data array, each element contains the letter x.

generatedataarray(6,{"x"})

Use the seq( function if you want a numbered array. This example creates a data array with numeric values from 1 to 10.

generatedataarray(10,{seq()})

This example creates an array with 10 text values: Price1, Price2, Price3, etc.

generatedataarray(10,{"Price"+seq()})

See Also


History

VersionStatusNotes
10.0NewNew in this version.