# DiscreteRandom

This block is a random signal generator based on discrete probability distribution. Each output component takes piecewise constant random values. Every time an event is received on the input event port, the outputs take new independent random values. Output port size is given by the size of the parameters matrices. You can choose the distribution.

## Library

SignalGenerators

## Description

The DiscreteRandom block is a discrete random wave generator. Each output component is an integer value (int32) and takes piecewise constant random values. Every time an event is received on the activation port, the outputs take new independent random values. Output port size is given by the size of the parameters matrices.

Supported distributions are: Bernoulli, Binomial, Poisson, Uniform, Geometric, HyperGeometric, Logarithminc, Negative Binomial.

## Parameters

Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|

| Select a distribution: | Probability distribution. Default value: 'uniform' | Structure | |

| Bernoulli | Number | 0 | |

| Binomial | Number | 0 | |

| Poisson | Number | 0 | |

| Uniform | Number | 0 | |

| Geometric | Number | 0 | |

| Hypergeometric | Number | 0 | |

| Logarithmic | Number | 0 | |

| Negative binomial | Number | 0 | |

| Seed (-1 for automatic) | Seed for the random generator (scalar). seed must be an integer between 0 and 2^32-1. Negative value for seed means automatic selection. | Matrix | |

| Bernoulli distribution parameters | Bernoulli probability distribution parameters. | Structure | |

| Success probability (0<p<1) | Cell of matrices | ||

| Binomial parameters | Binomial probability distribution parameters. | Structure | |

| Number of trials (>0) | Cell of matrices | ||

| Probability of success | Cell of matrices | ||

| Poisson distribution parameters | Poisson probability distribution parameters. | Structure | |

| Lambda (>0) | Cell of matrices | ||

| Uniform distribution parameters | Uniform probability distribution parameters. | Structure | |

| Lower bound | Cell of matrices | ||

| Upper bound | Cell of matrices | ||

| Geometric distribution parameters | Geometric probability distribution parameters. | Structure | |

| success probability (0<p<1) | Cell of matrices | ||

| HyperGeometric distribution parameters | Hypergeometric probability distribution parameters. | Structure | |

| Population size | Cell of matrices | ||

| Number of tagged items | Cell of matrices | ||

| Number of draws | Cell of matrices | ||

| Logarithmic distribution parameters | Logarithmic probability distribution parameters. | Structure | |

| Probability | Cell of matrices | ||

| Negative binomial distribution parameters | Negative binomial probability distribution parameters. | Structure | |

| Number of successes (>0) | Cell of matrices | ||

| probability of a success (0<p<1) | Cell of matrices |

## Ports

Name | Type | Description | IO Type | Number |
---|---|---|---|---|

| explicit | output | 1 | |

| activation | input | 1 |

## Advanced Properties

Name | Value | Description |
---|---|---|

| no | Time Dependency = standard mode activated |

| no | |

| no | |

| no | |

| no | |

| yes |