How to save dynare results in loop into a specified matrix

I do a loop in which dynare run 100 times, at the same time I want save the same name series into a specified matrix. forexample,
for i=1:100
dynare <filename.mod>
k(i,:) = y %y is series generated by dynare
end
I found it cannot work because dynare refreshs the workspace in matlab everytime, so result show k is not definded and cannot store the y.
who can help me to save dynare results very run into a fixed name matrix?
best regards
lizeze
for i=1:100
dynare <filename.mod>
k(i,:) = y %y is series generated by dynare
end
I found it cannot work because dynare refreshs the workspace in matlab everytime, so result show k is not definded and cannot store the y.
who can help me to save dynare results very run into a fixed name matrix?
best regards
lizeze