Add new line inside text file
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Text Files dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!