how to catch a matrix to a cell

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 日

0 投票

strcat(s,{':'},arrayfun(@num2str,p,'un',0))

1 件のコメント

Roger
Roger 2014 年 3 月 18 日
nice thanks

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeResizing and Reshaping Matrices についてさらに検索

タグ

質問済み:

2014 年 3 月 18 日

コメント済み:

2014 年 3 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by