Reshaping a cell array

조회 수: 15 (최근 30일)
L'O.G.
L'O.G. 2022년 11월 23일
편집: L'O.G. 2022년 11월 23일
I have a cell of cells, where each internal cell is a vector of numbers of type double. How can I reshape this in a less cumbersome way, so that I have one cell with its elements consisting of each vector (where the vectors in the first cell-within-a-cell come first, followed by the vectors in the second cell-within-a-cell, etc.)?

채택된 답변

Voss
Voss 2022년 11월 23일
C = {{[1 2 3]} {[4 5 6 7]} {[8 9]}}
C = 1×3 cell array
{1×1 cell} {1×1 cell} {1×1 cell}
C = [C{:}]
C = 1×3 cell array
{[1 2 3]} {[4 5 6 7]} {[8 9]}

추가 답변 (0개)

카테고리

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by