Combine cell array into a long string

4 views (last 30 days)
How do I reformat this cell array into one long string?
Original array:
CA = {'AAA ', 'BBB ', 'CCC '};
Desired String:
'AAA BBB CCC'

Accepted Answer

Walter Roberson
Walter Roberson on 17 Feb 2021
CA = {'AAA ', 'BBB ', 'CCC '};
strjoin(CA, '')
ans = 'AAA BBB CCC '

More Answers (0)

Categories

Find more on Characters and Strings in Help Center and File Exchange

Tags

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!