how to catch a matrix to a cell

1 次查看(过去 30 天)
if true
s={'CD2','GYA','LZH','GOM','XAN'};
p=[234 44 56 33 67];
end
i want get a cell like this
s={'CD2:234','GYA:44','LZH:56','GOM:33','XAN:67'};
do u have any idea?
  1 个评论
Roger
Roger 2014-3-18
or how to change p to {'234' '44' '56' '33' '67'},this will also help

请先登录,再进行评论。

采纳的回答

Andrei Bobrov
Andrei Bobrov 2014-3-18
编辑:Andrei Bobrov 2014-3-18
strcat(s,{':'},arrayfun(@num2str,p,'un',0))

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by