randarray

math

Generates an array of random numbers

Syntax

randarray(count)

Parameters

count (number)

The number of random values to generate

Returns

array

An array of random numbers between 0 and 1

Examples

Input:
randarray(5)
Output:
[0.xxx, 0.xxx, 0.xxx, 0.xxx, 0.xxx]
Input:
randarray(3)
Output:
[0.xxx, 0.xxx, 0.xxx]
Input:
randarray(10) | length
Output:
10

The randarray() function generates an array of random floating-point numbers between 0 and 1.

Usage

Use randarray() to generate multiple random values at once, useful for creating test data, sampling, or simulations.