Manuals/calci/PATTERNED

From ZCubes Wiki
Revision as of 14:56, 31 March 2014 by Swapna (talk | contribs)
Jump to navigation Jump to search

RANDOMNUMBERGENERATION(NumVariable,RandomNumber,Distribution,NewTableFlag,FromNum,ToNum,StepSize,NumRep,SeqRep)

where,

  • represents the number of columns for displaying the random numbers,
  • represents the number of rows for displaying the random numbers,
  • is the distribution method (i.e. "Patterned") for creating random values,
  • is the flag TRUE or FALSE.
  • represents the starting number,
  • represents the ending number,
  • represents the step size in between the given numbers,
  • represents the number of times the resulting numbers are to be repeated,
  • represents the number of times the result sequence has to be repeated.

PATTERNED RANDOMNUMBERGENERATION() is used to display the random numbers in which one occurrence can have repeating number and sequence in between the start and the end numbers.

Description

RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Patterned",FromNum,ToNum,StepSize,NumRep,SeqRep)

  • A Patterned Distribution is a distribution of random occurrences in which one occurrence has repeating number and sequence in between the start and the end numbers.
  • If is TRUE, the result is displayed on new zspace.
  • If is FALSE, the result is displayed on the same zcube. If omitted, it is assumed to be FALSE.
  • If <0 or <0, Calci displays an error message.
  • should be > , else Calci returns an error message.
  • represents the step size in between the given numbers. e.g. In the range of numbers 1 to 7 in steps of 2 are considered as 1,3,5,7.

Examples

=RANDOMNUMBERGENERATION(5,4,"Patterned",TRUE,2,6,2,2)

The above command displays the random numbers from 2 to 6 in steps of 2. The numbers are repeated twice and result is displayed in 5 columns and 4 rows in a separate zspace as -

RANDOM NUMBER GENERATION
PATTERNED DISTRIBUTION
2 2 2 2 2
2 2 2 2 2
4 4 4 4 4
4 4 4 4 4
6 6 6 6 6
6 6 6 6 6


=RANDOMNUMBERGENERATION(5,4,"Patterned",TRUE,2,6,2,2,2)

The above command displays the random numbers from 2 to 6 in steps of 2. The numbers are repeated twice. Also the whole sequence is repeated twice and result is displayed in 5 columns and 4 rows in a separate zspace as -

RANDOM NUMBER GENERATION
PATTERNED DISTRIBUTION
2 2 2 2 2
2 2 2 2 2
4 4 4 4 4
4 4 4 4 4
6 6 6 6 6
6 6 6 6 6
2 2 2 2 2
2 2 2 2 2
4 4 4 4 4
4 4 4 4 4
6 6 6 6 6
6 6 6 6 6

See Also

References