Write vector to txt in a loop
Mostrar comentarios más antiguos
Good afternoon.
I want to write a numbers of vectors to txt in a loop using dlmwrite. For example:
for n=1:a
x=(1,n,3)
...
dlmwrite('abc_n_y.txt',x,...)
the vector is updating everytime and replace the previous value in each loop while I hope that the name of the .txt will also update in each loop otherwise the old .txt will be replaced by the new one. But in this case the n in 'abc_n_y.txt' is obviously be treated as a character rather than a variable. Can anyone gives some help to me?
Many thanks!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Loops and Conditional Statements 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!