What is the difference between these two reading table file funciton?

EPL = readtable("EPLresults.csv")
another one is =
EPL = readtable("EPLresults.csv","TextType","string")
what this TextType and string are doing here?

댓글 수: 3

TextType Type for imported text data
'char' | 'string'
Type for imported text data, specified as the comma-separated pair consisting of 'TextType' and either 'char' or 'string'.
  • 'char' — Import text data into MATLAB as character vectors.
  • 'string' — Import text data into MATLAB as string arrays.
Example: 'TextType','char'
what is the importance of this function? and thank you for your reply.

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2023년 2월 28일

0 개 추천

If you have a particular variable (column) that contains some text, then do you want the text to be represented as a cell array of character vectors (the default) or do you want the text to be represented as a column vector of string() objects ('TextType', 'string') ? There are advantages and disadvantages to either choice.

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

질문:

2023년 2월 28일

댓글:

2023년 2월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by