フィルターのクリア

Brownian motion simulation in interval (0,1)

2 ビュー (過去 30 日間)
Alberto Navarro
Alberto Navarro 2013 年 9 月 27 日
コメント済み: Image Analyst 2013 年 9 月 27 日
Hi,
This should be fairly simple, but I haven't found an answer in the forums, maybe I´m not searching correctly. Anyway, I´m trying to simulate a normal random correlation curve, so I imagined just to simulate a Brownian motion in a given interval. How can I simulate a Brownian motion which values only stay in the interval [-1,1] or [0,1]? I just need it to be so that if a value reaches 1 (or -1), the next value rebounds with probability 1 to the other direction. Can someone please show me the way?
Most appreciated! Alberto

回答 (1 件)

Image Analyst
Image Analyst 2013 年 9 月 27 日
See my random walk demo attached below.
  2 件のコメント
Alberto Navarro
Alberto Navarro 2013 年 9 月 27 日
Thanks, but that doesn't really solve my question. I understand the procedure and i could turn it into one dimension, but I need a normal distribution, and I just need a vector where the trajectory doesn't surpass -1 or 1. Yours used a uniformly distributed values in the interval [-0.5,0.5].
Image Analyst
Image Analyst 2013 年 9 月 27 日
It wasn't intended to completely solve your problem. It was intended to be a starting point that you could adapt to your problem if you were having trouble starting your project. It should be easy enough to get random numbers, even normally distributed ones, in the range -0.5 to +0.5. If you don't want to do that and need someone to completely solve your problem for you, you can visit fiverr for a cheap solution, or attach your code here and point out where there are problems. Include any error messages, if any.

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by