add an empty line in the text file
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
hi there, I'm writing this program where the results are writtten to a text file. i am using: dlmwrite('test.txt',mat, '-append','delimiter','\t','newline','pc')
text file looks like:
2
3
4
6
but i want to add an empty line in between each results. looking like:
2
3
4
6
how do i do that?...please help. thanks in advance.
cheers SN
0 Kommentare
Akzeptierte Antwort
Fangjun Jiang
am 26 Okt. 2011
use fprintf()
fid=fopen('test.txt','wt');
fprintf(fid,'%d\n\n',mat);
fclose(fid)
1 Kommentar
Walter Roberson
am 26 Okt. 2011
It isn't clear to me whether the poster has one item per line or if that was merely a simplified example.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Environment and Settings 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!