Multiple lines in one cell using textscan

6 次查看(过去 30 天)
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 个评论
Ameer Hamza
Ameer Hamza 2020-11-30
Can you show the textscan command you are using? LineEnding is introduced in later releases.
David-Sharif Kohlberger
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Text Data Preparation 的更多信息

标签

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by