There seems to be a limitation on what can be done without feedback from me. I will just post my comment as an answer:
My bet would be a memory problem, if you want to fix it, look, there is still a problem, if you do not save the result in the first place, just delete this line:
results{ii, 1} = numberOfMC;
Also make sure that you don't have other growing variables or that you accidentally make input more complicated when you go. It probably doesn't matter since time also increases if you model everything in reverse order? Or, if you perform the full number of iterations, but each time with exactly the same input?
source share