Be the first to rate this file! 46 downloads (last 30 days) File Size: 1.69 MB File ID: #22003

Random Walks in MATLAB

by Mark Hoyle

 

05 Nov 2008 (Updated 07 Jan 2009)

Code covered by BSD License  

Files which simulate random walks on a lattice and on a graph

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

Download Now | Watch this File

File Information
Description

These files show how MATLAB can be used to simulate random walks both on a lattice in N-dimensions and on a graph. The zip file contains the following:

RandDir: generates a random basis vector on a lattice
RandGraphMove: Given a connection matrix for a graph generates a random neighbouring node to the one currently occupied
RandomWalks: script file to demonstrate the use of these files using the SDE engine in the econometrics toolbox
RandomWalks_NoEconometrics: Version of the preivous file which does no rely on the econometrics toolbox
DemoData.mat: Mat file for graph example
Demo_Image.gif: Image file for graph example.

The files RandDir and RandGraphMove generate random motions for a random walk on a lattive and on a graph respectively. The Files RandomWalks and RandomWalks_NoEconometrics run through a series of examples firstly going through random walks in 1, 2 and 3 dimensions and then performing a random walk on the London Underground.

The file RandomWalks uses the SDE engine in the Econometrics toolbox to perfrom the random walks, whereas RandomWalks_NoEconometrics uses for loops instead. I've foudn the version using the econometrics toolbox to be faster.

MATLAB release MATLAB 7.7 (R2008b)
Zip File Content  
Published M Files Random walks with the Econometrics Toolbox
Other Files
Demo_Image.gif,
DemoData.mat,
html/,
html/RandomWalks.png,
html/RandomWalks_01.png,
html/RandomWalks_02.png,
html/RandomWalks_03.png,
html/RandomWalks_04.png,
html/RandomWalks_05.png,
html/RandomWalks_06.png,
html/RandomWalks_07.png,
html/RandomWalks_08.png,
html/RandomWalks_09.png,
html/RandomWalks_eq06570.png,
html/RandomWalks_eq24049.png,
html/RandomWalks_eq27924.png,
html/RandomWalks_eq27941.png,
html/RandomWalks_eq28134.png,
html/RandomWalks_eq40747.png,
html/RandomWalks_eq53776.png,
html/RandomWalks_eq69739.png,
html/RandomWalks_eq70849.png,
html/RandomWalks_eq79464.png,
html/RandomWalks_eq79749.png,
html/RandomWalks_eq81000.png,
html/RandomWalks_eq81966.png,
html/RandomWalks_eq94611.png,
RandDir.m,
RandomGraphMove.m,
RandomWalks.m,
RandomWalks.png,
RandomWalks_NoEconometrics.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
07 Jan 2009

Now includes the main script published to html.

07 Jan 2009

Corrected image file

Tag Activity for this File
Tag Applied By Date/Time
graph Cristina McIntire 05 Nov 2008 12:51:20
lattice Cristina McIntire 05 Nov 2008 12:51:25
econometricsgarchsderandommathematics Mark Hoyle 05 Nov 2008 12:51:40
graph Mark Hoyle 13 Jan 2009 11:12:16
lattice Mark Hoyle 13 Jan 2009 11:12:18
graph Bailiang 15 Jan 2009 10:57:08
potw Shari Freedman 20 Apr 2009 12:55:14
graph Elvin 04 Sep 2009 04:56:56
lattice Elvin 04 Sep 2009 04:57:00
potw Elvin 04 Sep 2009 04:57:02
econometricsgarchsderandommathematics Elvin 04 Sep 2009 04:57:05
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com