how to create a binary random matrix

1 Ansicht (letzte 30 Tage)
loukil sana
loukil sana am 5 Mai 2016
hi, i want to create a binary random matrix of (4,2). matrix row could be: 0 0 or 0 1 or 1 0 or 1 1. how can i do that please. thanks

Antworten (1)

Azzi Abdelmalek
Azzi Abdelmalek am 5 Mai 2016
randi([0 1],4,2)

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