How to read a csv which contains both string and numbers with diferrent number of delimiters at each row?
Show older comments
I have a csv file which contains both string and numbers so I use textscan to read it. My problem is that each row has diferrent number of delimiters as a result different number of columns. How I can read it?
thank you very much
4 Comments
Shane
on 16 Oct 2015
Can you give an example of two rows of data that differ in delimiters?
Kelly Kyriakou
on 16 Oct 2015
Edited: Guillaume
on 16 Oct 2015
Guillaume
on 16 Oct 2015
This looks more like an xml file or it is some sort of custom formatting. Attach an entire file to know for sure.
In any case, it's not a file that can be read with matlab's csv file functions. You're going to have to write your own parser.
Kelly Kyriakou
on 16 Oct 2015
Accepted Answer
More Answers (0)
Categories
Find more on String Parsing 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!