Hi. I want to concatenate a cell array {'a', 'b', 5, []} in a string 'a b 5'. How can I do this?

 채택된 답변

Honglei Chen
Honglei Chen 2014년 8월 29일

2 개 추천

x = {'a','b',5,[]}
x = cellfun(@num2str,x,'UniformOutput',false)
sprintf('%s ',x{:})

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

질문:

2014년 8월 29일

답변:

2014년 8월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by