How to convert a cell array of string s

3 views (last 30 days)
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

Walter Roberson
Walter Roberson on 3 Mar 2019
temp = regexp(s, '(?<=\S)\s+', 'split');
s = vertcat(temp{:});
  1 Comment
Mai Le Thai
Mai Le Thai on 3 Mar 2019
Thanks for your help!
Can you please explain this '(?<=\S)\s+'?

Sign in to comment.

More Answers (0)

Categories

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

Tags

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!