Why doesn't the "textscan" function display the empty character after the delimiter?
Show older comments
I found that the "textscan" function returns a different number of tokens than expected when a string ends with a delimiter. For example:
'a,b,c' --> 3 tokens
'a,,c' --> 3 tokens
'a,b,' --> 2 tokens, but expected 3 tokens
I would expect n+1 tokens for n delimiters assuming multiple delimiters are not being combined together.
Is this expected behavior? And is there a way to display the empty character at the end after the delimiter?
Accepted Answer
More Answers (0)
Categories
Find more on Characters and Strings in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!