RndSample

The function wizard for the RndSample function looks as follows:

Syntax

RndSample(N, M)

Parameters

N. Dimension of the required array, greatest value in it. Parameter value cannot be less than one.

M. Number of values for sampling. The value of the M parameter must not exceed the value of the N parameter. Value of the parameter must be greater than one.

NOTE. To determine the parameter, specify either the number or the address of the cell where it is located.

Description

Returns the random sample of M elements from the elements array, which are integers from 1 to N.

Comments

This function returns an array, so it is to be entered as an array formula. If you enter the formula into a single cell, the element of the inverse matrix is shown.

Example

Formula Result Description
= RndSample(A1, 2) Changes. A sampling of random numbers between 1 and the value stored in the A1 cell. The sampling will contain two values.
= RndSample(5, 2) Changes. A sampling or random numbers between 1 and 5. The sampling will contain two values.

Formula in this example must be entered as an array formula. To do this:

  1. Enter formula into the cell.

  2. Select a range with the size equal to size of the source matrix, starting with the cell that contains formula.

  3. Press F2, and then CTRL+SHIFT+ENTER.

If the formula is not entered as an array formula, the value of inverse matrix is displayed.

See also:

Function Wizard │ MathematicalIMath.RndSample