Add new line inside text file
Mostrar comentarios más antiguos
Dear All,
I have a txt file containing:
a, b, c, d, e, f, g, h, i
I have an iteration:
for i=1:10
for j=1:10
dlmwrite('mydata.txt', myvar, '');
end
end
The problem is that it overwrite what I already have in my txt file and it only writes the last value.
What I want as a result in my mydata.txt is something like:
a, b, c, d, e, f, g, h, i
1, 3, 6, 4, 8, 1, 8, 9, 0
2, 5, 6, 7, 5, 4, 2, 9, 4
...
Thank you and regards, Sypou
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Text Files en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!