split columns with separate elements

1 view (last 30 days)
Dion Theunissen
Dion Theunissen on 10 Aug 2022
Commented: dpb on 10 Aug 2022
I have a column with lastnames and insertions. How can i split those? Cause not all the lastnames have the same number of elements.
a = bookings.child_firstname
b = split(a,' ')
Now I have the following error:
Error using split
Element 8 of the text contains 1 matches while the previous elements
have 0. All elements must contain the same number of matches.
  4 Comments
dpb
dpb on 10 Aug 2022
One could also investigate the new(ish) pattern object/function that has "regexp for dummies" kind of functionality...

Sign in to comment.

Answers (0)

Categories

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

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!