Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to simulate (for the first time) a 2-dimensional SDE, in Matlab.

$$dX(t)=F(t,X(t))\,dt + \sigma(t,X(t))\,dBt$$

I have no problem using the Euler-Maruyama method in the one dimensional case, but I am not sure if I am correct with the 2-dimensional Brownian motion $B=(B_1,B_2)$.

I need to simulate two sequences $dB_1$ and $dB_2$. Can I just simulate 2 sequences in Matlab $\sqrt{dt}*randn$? Will they be independent ?

I tried to search for tutorials on simulation of two independent Brownian motions. Can you help me with this? What is the easiest way of generating two independent sequences of normally distributed random numbers?

Thank you :) Bilka

share|cite|improve this question

The following code

>> X = cumsum(0.01 * randn(10000,2));
>> plot(X(:,1), X(:,2))
>> axis equal

generates this plot. Adjust parameters to taste.

enter image description here

share|cite|improve this answer

You can find the code for a complete 2d simulation here. In any case, this is kind of things where tons of material can be found just using google.

share|cite|improve this answer

"Can I just simulate 2 sequences ..."

Yes you can just do it in the straightforward way, and it will do the right thing.

share|cite|improve this answer
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. – Sasha Sep 9 '12 at 3:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.