how to catch a matrix to a cell

1 vue (au cours des 30 derniers jours)
Roger
Roger le 18 Mar 2014
Commenté : Roger le 18 Mar 2014
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 commentaire
Roger
Roger le 18 Mar 2014
or how to change p to {'234' '44' '56' '33' '67'},this will also help

Connectez-vous pour commenter.

Réponse acceptée

Andrei Bobrov
Andrei Bobrov le 18 Mar 2014
Modifié(e) : Andrei Bobrov le 18 Mar 2014
strcat(s,{':'},arrayfun(@num2str,p,'un',0))
  1 commentaire
Roger
Roger le 18 Mar 2014
nice thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Types dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by