organize the inside of the .txt file
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Alberto Acri
il 17 Giu 2023
Commentato: Star Strider
il 18 Giu 2023
How can I organize the data.txt file to get the data_new.txt file?
0 Commenti
Risposta accettata
Star Strider
il 17 Giu 2023
Modificato: Star Strider
il 17 Giu 2023
type('data.txt')
type('data_new.txt')
T1 = readtable('data.txt', 'VariableNamingRule','preserve')
writetable(T1, 'new_file.txt', 'Delimiter','\t') % Write New File
type('new_file.txt')
I am not certain that it is possible to change the delimiter from a comma (,) to a tab except by writiing it to a new file.
EDIT — Corrected typographical errors.
.
4 Commenti
Star Strider
il 18 Giu 2023
What the file contains internally is irrelevant. It only has to produce the correct result when read.
If you want it to look like that internally, use the Contact Support link to submit an enhancement request. Include the URL of this thread in your note to MathWorks.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Text Files in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!