Hello,

Here is what we did in Scilab (should be similar to Matlab) for a Brownian motion :

Instead of rand(1,1,'norm'), include your Box-Muller thing.Code:function X=Brownian(N,T) X=zeros(N+1,1); X(1)=0; for k=2:(N+1) X(k)=X(k-1)+(T/sqrt(N))*rand(1,1,'norm'); end endfunction X=Brownian(200,1); clf(); plot(X)

Adapt it to get 2 Brownian motion (should not be difficult, since the BM transform actually gives 2 normal random variables ^^)