- 'char' — Import text data into MATLAB as character vectors.
- 'string' — Import text data into MATLAB as string arrays.
What is the difference between these two reading table file funciton?
1 次查看(过去 30 天)
显示 更早的评论
EPL = readtable("EPLresults.csv")
another one is =
EPL = readtable("EPLresults.csv","TextType","string")
what this TextType and string are doing here?
3 个评论
回答(1 个)
Walter Roberson
2023-2-28
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!