If you have a known number of iterations, then pre-allocate a cell array and store the results into that.
If you have a maximum possible return size per iteration, sometimes it makes sense to take the output, pad it with filler values to the maximum size, and store the padded value into a pre-allocated array.
If I am reading multiple files in which I do not know maximum reasonable size, then at each step I read in a file, and compare the dimensions to the current dimensions of my accumulated data. If the new data is smaller in a dimension than the accumulated data, then I pad the data to the current size. If the new data is larger in some dimension than the saved data then I pad the saved data to the new size. Then now that the sizes are compatible, store the new data. This code takes a bit of work (it is easier if padding with zero is acceptable.)