How to stack columns in a matrix?

10 visualizaciones (últimos 30 días)
Rijul Chauhan
Rijul Chauhan el 31 de Mzo. de 2022
Respondida: Voss el 31 de Mzo. de 2022
Hello all,
So I have a xyz coordinate matrix in the following format:
A = [x y z x y z x y z ...];
How do I convert it to look like:
B = [x y z;
x y z;
x y z;
...
...
...]
Thank you!

Respuestas (1)

Voss
Voss el 31 de Mzo. de 2022
A = 1:12
A = 1×12
1 2 3 4 5 6 7 8 9 10 11 12
B = reshape(A,3,[]).'
B = 4×3
1 2 3 4 5 6 7 8 9 10 11 12

Categorías

Más información sobre Logical en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by