What is the difference between these two reading table file funciton?
Mostra commenti meno recenti
EPL = readtable("EPLresults.csv")
another one is =
EPL = readtable("EPLresults.csv","TextType","string")
what this TextType and string are doing here?
3 Commenti
Voss
il 28 Feb 2023
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'
Md Jonayet
il 28 Feb 2023
Risposte (1)
Walter Roberson
il 28 Feb 2023
0 voti
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.
Categorie
Scopri di più su Characters and Strings in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!