I am conducting a Monte Carlo simulation of a stochastic differential equation, and trying to parallelize each random walk. Take a simplified example:
W(j,i) = W(j,i-1) + N(j,i);
Matlab complains because it can't slice W(j,i-1) because of the 'i-1' indexing. To me, this seems silly because I am still not doing anything that couples each iteration of the parfor (each iteration of parfor works on a separate row).
Is there a way around this that is hopefully elegant and simple?