how to generate a random matrix with a specific conditions ?
    4 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
if i have (n,m) MATRIX M
 M = [ 0 1 1 0 1 0 1 1 1
       1 1 0 1 1 0 0 0 1
       1 1 0 0 1 1 0 1 0
       0 0 1 1 0 1 0 0 1 ] 
 and i found from M these matrix 
 M_row = [ 2 1 3 
           2 2 1 
           2 2 1 
           2 1 1  ]
 M_column = [ 0 0 1 1 0 0 0 1 2
              2 3 1 1 3 2 1 1 1 ]
 Where
M_row shows the number of group ones in each row in M
M_column shows the number of group ones in each column in M
i want to generate a tow random matrix using M_row and M_column with the same size of M like this example
 M_rand_row = [ 1 1 0 1 0 1 1 1 0
                0 1 1 0 1 1 0 0 1
                1 1 0 1 1 0 0 1 0
                0 1 1 0 0 1 0 1 0 ]
 M_rand_column = [ 0 1 1 1 0 1 1 1 1
                   0 1 0 0 1 1 0 0 1
                   1 1 0 1 1 0 0 0 0
                   1 0 1 0 1 0 0 1 1]
0 Commenti
Risposte (0)
Vedere anche
Categorie
				Scopri di più su Matrix Indexing in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
