transform 1x12 cell to 3x4 cell

1 次查看(过去 30 天)
Hi! I have a cell like this:
A = {'5','11','69','85','114','169','188','196','250','258','267','295'};
I want to transform it like this:
A = {'5','11','69','85';'114','169','188','196';'250','258','267','295'};

采纳的回答

Dyuman Joshi
Dyuman Joshi 2023-6-23
A = {'5','11','69','85','114','169','188','196','250','258','267','295'}
A = 1×12 cell array
{'5'} {'11'} {'69'} {'85'} {'114'} {'169'} {'188'} {'196'} {'250'} {'258'} {'267'} {'295'}
A = reshape(A,4,[])'
A = 3×4 cell array
{'5' } {'11' } {'69' } {'85' } {'114'} {'169'} {'188'} {'196'} {'250'} {'258'} {'267'} {'295'}

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by