Merging the Cell Array Elements

1 回表示 (過去 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) );
  1 件のコメント
tinkyminky93
tinkyminky93 2022 年 6 月 7 日
Great job! Thank you sir.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by