Borrar filtros
Borrar filtros

one dimensional random walk model MATLAB code??

5 visualizaciones (últimos 30 días)
RSR
RSR el 16 de Abr. de 2015
Editada: RSR el 19 de Mayo de 2015
A drunk man's random walk in one dimension
  3 comentarios
xosro
xosro el 18 de Abr. de 2015
hi i am not sure this code is what you want.|
if true
y=0;
i=1;
while 1>0
a=sign(randn);
y(i+1)=y(i)+a;
pause(.00005);
plot(y)
i=i+1;
end
end
James Tursa
James Tursa el 18 de Abr. de 2015
How often does he take a step? When does he go to sleep? What was he drinking?

Iniciar sesión para comentar.

Respuesta aceptada

Image Analyst
Image Analyst el 18 de Abr. de 2015
The most I can do is to offer up these two attached random walk demos that I've posted before (and you've probably already found if you've done a search of this forum). Feel free to adapt them to 1D by getting rid of the "y" calculation. If you have specific questions with your code, read these:
and then come back here.

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB 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