#include <oxstd.h>

main()
{
    decl crep = 4, ct = 50, i, sfile, mx;

    for (i = 0; i < crep; ++i)
    {
        mx = rann(ct, 1); // some lengthy calculation
        sfile = sprint("step", i, ".mat");
        savemat(sfile, mx);
        print("Step ", i, " saved to \"", sfile,
            "\"; mean:", meanc(mx));
    }
}
