About matrix: how to make matrix binary (0 and 1)
    7 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
I need write the matrix (0 0 0 0 0), (1 0 0 0 0), (1 1 0 0 0), (1 1 1 0 0),..., (1 1 1 1 1) with 32 possibilities of zero and one using the matlab, and don´t hand.
Thanks.
0 comentarios
Respuestas (1)
  Matt Fig
      
      
 el 17 de Dic. de 2012
        
      Editada: Matt Fig
      
      
 el 17 de Dic. de 2012
  
      S = dec2bin((1:32).')  % If a string is o.k.
N = S - '0'  % If you need a numeric matrix.
Ver también
Categorías
				Más información sobre Logical en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!






