saving files in a loop with different names
32 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
h k
el 15 de Jun. de 2021
Comentada: Stephen23
el 15 de Jun. de 2021
hello
in my code created one file is name (info.dat)
I have save every file has created.
File content attached
for k = 1:20
...
% here created (info.dat)
...
end
3 comentarios
Respuesta aceptada
Scott MacKenzie
el 15 de Jun. de 2021
for k=1:20
...
filename = sprintf('info%d.dat', k);
writematrix(M, filename); % data in M
...
end
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Environment and Settings en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!