Filter löschen
Filter löschen

How to generate binary samples

1 Ansicht (letzte 30 Tage)
Thirunavukkarasu
Thirunavukkarasu am 30 Aug. 2014
Beantwortet: the cyclist am 30 Aug. 2014
how to generate binary sample for given input signals for example xor function of two input signals with 32 binary samples

Antworten (1)

the cyclist
the cyclist am 30 Aug. 2014
If you have the Statistics Toolbox, you can use the binornd() function.
Alternatively, you could use randn() or rand():
randn() > 0
rand() > 0.5
will give 50% chance of either 0 or 1.

Kategorien

Mehr zu Random Number Generation finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by