Update Randomization Tools: Links authored by Fabian Berg's avatar Fabian Berg
...@@ -4,7 +4,7 @@ This chapter contains functions you can use to produce randomized outputs for sp ...@@ -4,7 +4,7 @@ This chapter contains functions you can use to produce randomized outputs for sp
## randomOrder ## randomOrder
function: [rndm] = randomOrder(numitems,len,varargin) function: [rndm] = [randomOrder(numitems,len,varargin)](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Tools/randomOrder.m)
**Description** **Description**
This function is used to generate a vector of random numbers with length len and the values 1:numitems. Randomization can be controlled by optional arguments. This function is used to generate a vector of random numbers with length len and the values 1:numitems. Randomization can be controlled by optional arguments.
...@@ -17,30 +17,30 @@ This function is used to generate a vector of random numbers with length len and ...@@ -17,30 +17,30 @@ This function is used to generate a vector of random numbers with length len and
**Input-Optional** **Input-Optional**
~~~ ~~~
varargin ratio vector, used to specify the ratio of randomized items. varargin 'ratio' vector, used to specify the ratio of randomized items.
Values between 0-1. All entries must add up to 1. Make Values between 0-1. All entries must add up to 1. Make
sure that the ratio is compatible with the default value for sure that the ratio is compatible with the default value for
maxRepeat(3). Using this argument will cause a warning, to 'maxRepeat'(3). Using this argument will cause a warning, to
disable it, add the argument NoWarning. disable it, add the argument 'NoWarning'.
maxRepeat specifies the maximal number of repetitions of each item. 'maxRepeat' specifies the maximal number of repetitions of each item.
Default is 3. Setting this value too low can lead to Default is 3. Setting this value too low can lead to
uniformity of the output. Using this argument will cause uniformity of the output. Using this argument will cause
a warning, to disable it, add the argument NoWarning. a warning, to disable it, add the argument 'NoWarning'.
boolean returns boolean vector (true or false), not values 'boolean' returns boolean vector (true or false), not values
(1:numitems). Using this parameter will issue a warning (1:numitems). Using this parameter will issue a warning
when numitems is bigger than 2 (every value bigger than when numitems is bigger than 2 (every value bigger than
2 will be converted to true). To disable it, add the argument 2 will be converted to 'true'). To disable it, add the argument
‘NoWarning’. ‘NoWarning’.
normalized returns vector of random numbers chosen from a normal 'normalized' returns vector of random numbers chosen from a normal
distribution with mean MU and standard deviation distribution with mean MU and standard deviation
SIGMA. Necessary additional arguments: mu and sigma. SIGMA. Necessary additional arguments: mu and sigma.
The first argument numitems has no effect for this The first argument 'numitems' has no effect for this
argument!!! Any number is fine!!! argument!!! Any number is fine!!!
maxTries specifies the maximal number of tries to comply with the 'maxTries' specifies the maximal number of tries to comply with the
criteria. Default is 50. Some criteria can be hard to match, criteria. Default is 50. Some criteria can be hard to match,
setting this value very high prevents the function from setting this value very high prevents the function from
terminating with an error when the criteria are set very terminating with an error when the criteria are set very
...@@ -77,11 +77,11 @@ This function is used to generate a vector of random numbers with length len and ...@@ -77,11 +77,11 @@ This function is used to generate a vector of random numbers with length len and
~~~ ~~~
**See also** **See also**
randperm, rand, randn [randperm](https://de.mathworks.com/help/matlab/ref/randperm.html), [rand](https://de.mathworks.com/help/matlab/ref/rand.html?s_tid=doc_ta), [randn](https://de.mathworks.com/help/matlab/ref/randn.html)
## nBackBuffer ## nBackBuffer
function: out = nBackBuffer(len, n, numMatch) function: out = [nBackBuffer(len, n, numMatch)](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Tools/nBackBuffer.m)
**Description** **Description**
Creates a buffer for n-back experiments Creates a buffer for n-back experiments
... ...
......