I want to know how randomly generate a sequence either -1 or 1
for example:
[1 1 -1 -1] or [-1 1 -1 1 1 1 1 -1 ] or [-1 1 1 -1 1 -1 -1] are all I expected.
but [-1 0 1 -1 -1 ] or [2 1 -1 -1 1 1 ] are not what I want.
Thank u guys.
Aucun commentaire:
Enregistrer un commentaire