How to stack columns in a matrix?

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!

답변 (1개)

Voss
Voss 2022년 3월 31일

0 개 추천

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

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

질문:

2022년 3월 31일

답변:

2022년 3월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by