Saving a variable at every run

조회 수: 4 (최근 30일)
Ayobami Meadows
Ayobami Meadows 2022년 2월 4일
편집: Stephen23 2022년 2월 4일
Assuming I've got to perform 10 runs and each run has 50 iterations. And there is a BestResult produced at a particular iteration in each run. I need to save these BestResult automatically at each run.
save BestResult
However, using the above would only save for one last run by overwriting those previously saved. Perhaps if there's a way it could by itself index the file name saved, so that the previous wouldn't be overwritten?
  댓글 수: 2
KSSV
KSSV 2022년 2월 4일
Show us your code.
Stephen23
Stephen23 2022년 2월 4일
편집: Stephen23 2022년 2월 4일
"Perhaps if there's a way it could by itself index the file name saved, so that the previous wouldn't be overwritten?"
Of course, this is trivial using SPRINTF, just as the documentation shows:

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by