I want to create a nxn matrix with all 0s and n randomly placed 1s
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Sahil Bajaj
il 26 Nov 2015
Commentato: Sahil Bajaj
il 26 Nov 2015
I want to create a nxn zero matrix with n randomly placed ones in the matrix
Example
1st try
1 0 0
0 1 0
0 0 1
2nd Try
0 0 1
0 1 1
0 0 0
0 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Multidimensional Arrays in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!