merge cell array
显示 更早的评论
Hi everybrody I have one column of text data (B) and one column of numerical data (A). I have to merge the two array in a unique dataset made of two columns (C). How can I do it?
simplified example: A=[0,1 0,2 0,3] B=[AT DE FR] C=[AT 0,1 DE 0,2 FR 0,3]
Thank you Giovanni
1 个评论
the cyclist
2012-6-14
This question would be clearer if you could use valid MATLAB syntax to indicate what A, B, and C look like.
回答(1 个)
Here's a guess
% "one column of numerical data":
A = {[0 1]; [0 2]; [0 3]}
% "one column of text data":
B = {'AT'; 'DE'; 'FR'}
% merge to two columns:
C = [B A]
1 个评论
Voss
2023-8-15
@Giovanni Nappi: Did this answer work for you?
类别
在 帮助中心 和 File Exchange 中查找有关 Cell Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!