How to convert a cell array of string s

I want to convert a cell of string into another like this. How can i do this? Thanks!
from hi.PNG into ba.PNG

 Accepted Answer

temp = regexp(s, '(?<=\S)\s+', 'split');
s = vertcat(temp{:});

1 Comment

Thanks for your help!
Can you please explain this '(?<=\S)\s+'?

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2018b

Tags

Community Treasure Hunt

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

Start Hunting!