How to read a csv which contains both string and numbers with diferrent number of delimiters at each row?
Mostrar comentarios más antiguos
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 comentarios
Shane
el 16 de Oct. de 2015
Can you give an example of two rows of data that differ in delimiters?
Kelly Kyriakou
el 16 de Oct. de 2015
Editada: Guillaume
el 16 de Oct. de 2015
Guillaume
el 16 de Oct. de 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
el 16 de Oct. de 2015
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre String Parsing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!