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.
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)


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




Community Treasure Hunt

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

Start Hunting!