We have been working frenetically on Efofex parameters and the inline calculator over the last few months and have created a number of new, powerful parameters and commands. This article discusses the new parameter types.
Shuffle Parameters
A shuttle parameter allows you to quickly create a shuffled list. For example,
$p=shuffle(1,6)
will automatically create a shuffled list of the numbers from 1 to 6. This means that $p might be
3, 4, 1, 6, 5, 2 or 4, 5, 1, 2, 6, 3 or any other arrangement.
You will normally access shuffled lists using references.
$p[1] or $p[4] for example.
Coprimes Parameters
A coprimes parameter produces a randomly selected set of (up to 10) coprime numbers from the indicated range.
$p = coprimes(1,50)
This parameter might produce
34, 35, 11, 31… or 4, 21, 19, 43…
This allows you to quickly create new sets of coprime numbers (numbers which share no common factors)
Data Parameters
A data parameter is really just a list of values (a bit like a list parameter). The difference is that data parameters are designed to be worked on as a data set. For example, you can find the mean of a data parameter using a simple calculator command.
A simple data parameter looks just like a list parameter.
$p=data(1,4,6,8,2,4,7,2)
but you will not often write out your own set of data. A more useful way to get a data set is to use one of our random number parameters.
Random Number Parameters
Our random number parameters allow you to quickly create data parameters using random numbers. The two you will use most often are:
$p=randnormal(50,10,30,2)
Which will produce 30 normally distributed random numbers from a population with a mean of 50 and a standard deviation of 10 (rounded to 2 decimal places).
or
$p=randbetween(1,6,30)
Which will produce 30 uniformly distributed random numbers from 1 to 6 (equivalent to rolling a die 30 times)
There are a number of other distributions you can use. These are mentioned in our online help.
Discover more from Efofex News
Subscribe to get the latest posts sent to your email.