How to put each group of cells in the same row ?

조회 수: 5 (최근 30일)
Sarah A
Sarah A 2019년 2월 11일
댓글: Sarah A 2019년 2월 11일
Hello,
Let we have a cell array A of size (1*5216), I want to put each 16 cell in the same row. So how can I do that ?

채택된 답변

Guillaume
Guillaume 2019년 2월 11일
reshape(A, 16, [])'
reshapes your cell array in columns of 16 rows (since matlab is column major). Then transpose to have rows of 16 columns.
That's assuming you want to preserve the ordering, otherwise
reshape(A, [], 16)
which directly reshape in rows of 16 columns.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by