series (replaces TSeries)


The series function returns a 1-dimensional array containing a uniformly spaced list of numbers.

Syntax

tbl = series( nCount )

tbl = series( nCount, nMin, nStep )

bullet.gif    nCount is the number of Gaussian Deviates to create.

bullet.gif    nMin is the minimum value of the sequence. If omitted, it is 1.0.

bullet.gif    nStep is the interval between numbers in the sequence. If omitted, it is set to 1.0.

bullet.gif    tbl is the returned array containing nCount values.

bullet.gif    On failure, nil is returned.

Example

The following script returns a 1-dimensional array containing 100 numbers starting at 10 with a spacing of 5.4, then plots them as a histogram:

tbl = series( 100, 10, 5.4 )

-- create a table of 100 numbers

H = new_histogram()

-- create a Histogram object

h = H:Calc( y )

-- compute the histogram

plot( x, h )

-- plot the histogram

H:delete()

 

Related Topics

Table and Array Functions, random, CStats class


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.