Unrest cell of cells

조회 수: 14 (최근 30일)
Shunan Sheng
Shunan Sheng 2022년 1월 7일
댓글: Shunan Sheng 2022년 1월 7일
Suppose I have a 1x2 cell of cells, I want to reshape the cell to a 2 x 3 cell. How can I do?
For example, the original cell is
test_cell={{1,2,3};{2,3,4}};
% we want
% 2×3 cell array
%
% {[1]} {[2]} {[3]}
% {[2]} {[3]} {[4]}

채택된 답변

KSSV
KSSV 2022년 1월 7일
test_cell={{1,2,3};{2,3,4}};
reshape([test_cell{:}],3,2)'
ans = 2×3 cell array
{[1]} {[2]} {[3]} {[2]} {[3]} {[4]}

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by