saving files in a loop with different names
조회 수: 27 (최근 30일)
이전 댓글 표시
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
채택된 답변
Scott MacKenzie
2021년 6월 15일
for k=1:20
...
filename = sprintf('info%d.dat', k);
writematrix(M, filename); % data in M
...
end
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!