How to write multiple rows in a multiple column way without changing the order

 Respuesta aceptada

result = reshape(A.',1,numel(A));

2 comentarios

Thnaks. I understand the row to column and numel operation. What is 1 for ? Number of rows ?
James Tursa
James Tursa el 4 de Oct. de 2017
Editada: James Tursa el 4 de Oct. de 2017
Yes, the 1 is the number of rows, and numel(A) is the number of columns. The initial transpose is to get the row elements of the original A to be next to each other in memory so they will appear next to each other after the reshape.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 4 de Oct. de 2017

Editada:

el 4 de Oct. de 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by