How to rearrange data in matrix ?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Pradya Panyainkaew
el 18 de Dic. de 2017
Comentada: Pradya Panyainkaew
el 18 de Dic. de 2017
if I have A=[1:15].
After that, I want to rearrange matrix A to get a result: MyResult=[1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15];
How can I code to get the result like this ?
0 comentarios
Respuesta aceptada
Stephen23
el 18 de Dic. de 2017
>> A = 1:15;
>> reshape(A,5,3).'
ans =
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
>>
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrices and Arrays 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!