Save multiple run result of script
Show older comments
Hi i'm writing a code with matlab, i wonder if there is a way to save the result of my script every time i run it.Example if i run this code multiple times i want to get all different outputs in my vector or file in case of using save function.
s=[];
s=fitness(D,vect);
Because every time i execute, it overwrites the last result.
Thank you.
Accepted Answer
More Answers (1)
An alternative to using a loop: download my FEX submission nextname, which will generate the next filename each time you call it. Simply put this in your script to generate the filename:
name = nextname('result_<1>.mat')
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!