How do one estimate in a loop?


In Dynare, how do I do estimations in a loop with different sets of data obsevations. In particular, say, for example I have a matlab data file containing vectors (100000by1 – simulated data) for the varobs, how do I ask Dynare to keep estimating based on the first 100 obsevations (1st-100th), the second 100 observations (101st-200th), and so on … for 100 times in a loop, and to generate 100 sets of parameters estimates (only need the modes).

Equivalently my question: how can I make something like this implementable in Dynare:
for i = 1:99
mode_compute=4, mh_replic=0);
where, glsysimdata contains all the 100000by1 vectors (or would it help to reshape them to 100by100?), in the above case, estimation would start from the 101st-200th (so a loop of performming estimations for 99 times).

Finally, if the above is doable, how can I save all the estimated modes (100 sets of posterior mode estimates with each set being estimated on each set of 100 obsevations)??

Many thanks in advance!