How can I create Wiener Process (Wiener-Levy or Brownian)

35 visualizaciones (últimos 30 días)
Jack Huber
Jack Huber el 19 de En. de 2021
For the first 100 seconds of the Wiener Process, I want to write a code that generates 100 sample functions using Matlab. Meanwhile, I am trying to find the mean and variance functions of the Wiener Process. Below is the stage I have reached. But it's not working the way I hope. Which part I am doing mistake? Is there any missing function or any other thing that I forgot?
T = 1; N = 500;
dt = T/N;
dW = zeros(1,N);
W = zeros(1,N);
dW(1) = sqrt(dt)*randn;
W(1) = dW(1);
for j = 2:N
dW(j) = sqrt(dt)*randn;
W(j) = W(j-1) + dW(j);
end
clearvars;
x(1)=0;
for i=1:100
dx(i)=2*randn()+0.1;
x(i+1)=x(i)+dx(i);
plot(x)
mean(x)
var(x)
end

Respuestas (0)

Categorías

Más información sobre Polynomials en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by