series (replaces TSeries)


The series function creates and 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 creates an array for the x-axis containing 100 numbers beginning at 10 and with a spacing of 5.4. An array for the y-axis is created containing 100 Gaussian Deviates. They are then graphed as a scatter plot.The result should show a Gaussian curve:

x = series( 100, 10, 5.4 )

-- create an array of 100 numbers

y = random(100)

-- create an array of 100 Gaussian Deviates

plot( x, y )

-- plot the histogram

Related Topics

Array Functions

random

 


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