필터 지우기
필터 지우기

Merging the Cell Array Elements

조회 수: 2 (최근 30일)
tinkyminky93
tinkyminky93 2022년 6월 7일
댓글: tinkyminky93 2022년 6월 7일
Hello,
I have a cell array which has the dimensions of 64x1 cell. I try to take the first 2 element then merge them. I tried horzcat and vertcat but they do not solve my problem completely. How can I do it?
64x1 cell
FF
01
FF
01
FF
01
...
I want my cell array to be 32x1 like
'FF01'
'FF01'
'FF01'
....
..
Thank you for your help.

채택된 답변

Matt J
Matt J 2022년 6월 7일
C=string(reshape(yourCell,2,[])');
out=cellstr( C(:,1)+C(:,2) );

추가 답변 (0개)

카테고리

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

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by