Tab key reading problem
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sergio Vez
am 29 Okt. 2019
Bearbeitet: Shivam Prasad
am 5 Nov. 2019
Good morning,
I'm trying to read in matlab a ".txt" with the following shape
"RechSt.CalculateP_Usage=0¶
RechSt.CalcWithMidTol=0¶
RechSt.ScoringStandard=0¶"
Having a tab key at the end of each line. When I read it with MATLAB it changes to a symbol like � and therefore, when trying to use the saving file in another software, it gives me an error because it doesn't read the symbol � as a tab key (¶).
How could I fix it?
Thanks in advance!
Sergio
6 Kommentare
Akzeptierte Antwort
Shivam Prasad
am 5 Nov. 2019
Bearbeitet: Shivam Prasad
am 5 Nov. 2019
Hi Sergio,
Check if this works for you.
s=importdata('inp.txt')
filePh = fopen('outp.txt','w');
fprintf(filePh,'%s\n',s{:});
fclose(filePh);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Text Files finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!