MATLAB: Save multiple run result of script

javaMATLABsavevector

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.

Best Answer

EDITED
numOfRuns = 5;
for n=1:numOfRuns
s = fitness(D,vect);
save(['result_data_run_number_' num2str(n) ',mat'],'s');
end