Saving a variable at every run
Ältere Kommentare anzeigen
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 Kommentare
KSSV
am 4 Feb. 2022
Show us your code.
"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:
Antworten (0)
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!