because it returns a scalar, but should return a 166x1 vector.
Better fix notes:
The problem is narrowed down to the section of mkt_resample.m before the call to moments. Somehow the parameters to moments are changed such that it returns a scalar.
Solution found (I think):
monte_M cannot be set to 1. For values greater than 1, the program seems to work. It doesn't crash, anyway.
==Profiling==