saving files in a loop with different names
22 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
h k
am 15 Jun. 2021
Kommentiert: Stephen23
am 15 Jun. 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 Kommentare
Akzeptierte Antwort
Scott MacKenzie
am 15 Jun. 2021
for k=1:20
...
filename = sprintf('info%d.dat', k);
writematrix(M, filename); % data in M
...
end
0 Kommentare
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!