配列の並び替え
    12 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    H.O
 el 19 de Nov. de 2023
  
    
    
    
    
    Comentada: H.O
 el 23 de Nov. de 2023
            下記のような数値データがあり、一列にならんでいます。※数値データは例で、実際には連番ではありません。 1; 2; 3; 4; 5; 6; 、、、
を 1 2 3; 4 5 6; 、、、 のように3つを一行として取り出し、下に追加していくように並べ替えたいです。ご教示ください。
0 comentarios
Respuesta aceptada
  madhan ravi
      
      
 el 19 de Nov. de 2023
        
      Editada: madhan ravi
      
      
 el 19 de Nov. de 2023
  
      a = 1 : 9;
assert(~rem(prod(size(a)), 3), 'not multiples of 3')
reshape(a, 3, [])
reshape(a.', 3, [])
reshape(a, 3, []).'
reshape(a, [], 3)
reshape(a.', [], 3)
reshape(a, [], 3).'
Más respuestas (0)
Ver también
Categorías
				Más información sobre Shifting and Sorting Matrices 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!