Graph in 3D Matlab
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Magdalin
am 18 Feb. 2017
Kommentiert: Image Analyst
am 19 Feb. 2017
I would like to present a Brownian motion figure (t, W (t)) in dimension 3, so as to have the x and y axes representing the time t and the z axis representing the brownian motion W (t). Here is the code I used in dimension 2 :
tf=350; % Set time interval [0,tf]
N=350; % Set number of steps to compute at in [0,tf]
h=tf/N; % Compute the time step
dW=sqrt(h)*randn(1,N); % Generate array of brownian movements
W=cumsum(dW); % Sum the array cummulativley
t=0:h:tf; % Array of equal time steps
plot(W); % Plot the Wiener process
xlabel('t');ylabel('W(t)');title('Sample Wiener Process')
4 Kommentare
Image Analyst
am 19 Feb. 2017
I gave you random walk code below. The thing we're all confused about is how you have two axes (x and y) for time ("have the x and y axes representing the time t ") while the particle travels in only one direction - the z direction. Explain why there are two time axes.
Akzeptierte Antwort
Image Analyst
am 19 Feb. 2017
Seems like a random walk program should do it. I'm attaching 3 different random walk simulations. Feel free to modify any of them.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!