For example, how to randomly generate a 1-by-12 matrix that contains 4 0s and 8 1s?
Like this matrix [1 0 0 1 0 0 0 1 0 0 1 0]
And if I generate again, it returns a different matrix [0 0 1 0 0 1 1 0 1 0 0 0]
Aucun commentaire:
Enregistrer un commentaire