MATLAB: How can a run the script 100 times and gain the results at once?

for loopresultsstruct

Hello,
I want to run my script 100 times and take all the answers for the 100 executions. I tried with the for loop as a struct that is shown bellow but it returns only the last executions results.
function [output]= extraScript(input)
for i=1:100
[output.i]= myScript(input);
end
Can anybody help me?? Thank you in advance!

Best Answer

for i=1:100
output{i}= myScript(input);
end