Multiple lines in one cell using textscan

조회 수: 6 (최근 30일)
David-Sharif Kohlberger
David-Sharif Kohlberger 2020년 11월 29일
댓글: David-Sharif Kohlberger 2020년 11월 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
David-Sharif Kohlberger 2020년 11월 30일
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