Concatenate cell array into one string
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Artyom
am 29 Aug. 2014
Beantwortet: Honglei Chen
am 29 Aug. 2014
Hi. I want to concatenate a cell array {'a', 'b', 5, []} in a string 'a b 5'. How can I do this?
0 Kommentare
Akzeptierte Antwort
Honglei Chen
am 29 Aug. 2014
x = {'a','b',5,[]}
x = cellfun(@num2str,x,'UniformOutput',false)
sprintf('%s ',x{:})
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!