Run test for randomness

`h = runstest(x)`

`h = runstest(x,v)`

`h = runstest(x,'ud')`

`h = runstest(___,Name,Value)`

```
[h,p,stats]
= runstest(___)
```

returns
a test decision for the null hypothesis that the values in the data
vector `h`

= runstest(`x`

)`x`

come in random order, against the alternative
that they do not. The test is based on the number of runs of consecutive
values above or below the mean of `x`

. The result `h`

is `1`

if
the test rejects the null hypothesis at the 5% significance level,
or `0`

otherwise.

`h = runstest(___,`

returns
a test decision using additional options specified by one or more
name-value pair arguments. For example, you can change the significance
level of the test, specify the algorithm used to calculate the `Name,Value`

)*p*-value,
or conduct a one-sided test.