Multiple lines in one cell using textscan

6 visualizaciones (últimos 30 días)
David-Sharif Kohlberger
David-Sharif Kohlberger el 29 de Nov. de 2020
Comentada: David-Sharif Kohlberger el 30 de Nov. de 2020
Hey,
I am trying to read files in which each data entry is limited by ";".
If I use textscan and set ';' as delimiter, it starts new cells when it reaches ";", but also every time a new line starts.
Is there a way to get textscan to only start a new cell when it reads the delimiter and ignore newline characters?
Thanks in advance.
  4 comentarios
Ameer Hamza
Ameer Hamza el 30 de Nov. de 2020
Can you show the textscan command you are using? LineEnding is introduced in later releases.
David-Sharif Kohlberger
David-Sharif Kohlberger el 30 de Nov. de 2020
FileStringsDraft=textscan(fid,'%s','Delimiter',';','CommentStyle','#','EndOfLine',';');
This is the one I've been trying now. The EndOfLine option seems to work now. Thank you.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Text Data Preparation en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by