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))

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Resizing 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