{"id":2368,"date":"2009-01-09T12:50:50","date_gmt":"2009-01-09T12:50:50","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2009\/01\/09\/random-walks\/"},"modified":"2016-05-18T11:22:45","modified_gmt":"2016-05-18T15:22:45","slug":"random-walks","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2009\/01\/09\/random-walks\/","title":{"rendered":"Random Walks"},"content":{"rendered":"<div class=\"content\">\r\n\r\n<a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/5021\">Bob<\/a>'s pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/22003-random-walks-in-matlab\">Random Walks<\/a> by Mark Hoyle.\r\n\r\n&nbsp;\r\n\r\nThis is a really nice demo. I've heard of random walks but never had need to use them so this was educational. Seeing how\r\nthe Econometrics Toolbox was value added in his solution is interesting. Mark's real world application (and sense of humor)\r\nmade the problem more engaging. (I'll leave validation of Mark's simulation to more qualified individuals.)\r\n\r\nIf his published example wasn't nutritious enough, Mark totally exceeded my expectations with his visualization. Annotating the map of London subway\r\nstops with results in 3D was not just a crisp, clear way to present results. That was also clever, creative and just plain\r\ncool!\r\n\r\nTo really appreciate this submission be sure to download the code and step through it with cell mode execution. Here is a\r\ntaste of just one of his several animations.\r\n\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/..\/..\/images\/pick\/randomwalks.gif\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n\r\nGreat demo, Mark. Thanks for posting it.\r\n\r\n<a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2368#respond\">Comments?<\/a>.\r\n\r\n<script>\/\/ <![CDATA[\r\nfunction grabCode_74e05c2d18894b248e13245029c831b6() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='74e05c2d18894b248e13245029c831b6 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 74e05c2d18894b248e13245029c831b6';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        author = 'Robert Bemis';\r\n        copyright = 'Copyright 2009 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('\r\n\r\n<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\r\n\r\n\r\n\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }\r\n\/\/ ]]><\/script>\r\n<p style=\"text-align: right; font-size: xx-small; font-weight: lighter; font-style: italic; color: gray;\">\r\n<a><span style=\"font-size: x-small; font-style: italic;\">Get\r\nthe MATLAB code\r\n<noscript>(requires JavaScript)<\/noscript><\/span><\/a>\r\n\r\nPublished with MATLAB\u00ae 7.8<\/p>\r\n\r\n<\/div>\r\n<!--\r\n74e05c2d18894b248e13245029c831b6 ##### SOURCE BEGIN #####\r\n%%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/5021 Bob>'s\r\n% pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/22003-random-walks-in-matlab Random Walks>\r\n% by Mark Hoyle.\r\n%%\r\n% This is a really nice demo. I've heard of random walks but never had need\r\n% to use them so this was educational. Seeing how the Econometrics Toolbox was\r\n% value added in his solution is interesting. Mark's real world application\r\n% (and sense of humor) made the problem more engaging. (I'll leave validation\r\n% of Mark's simulation to more qualified individuals.)\r\n%%\r\n% If his\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fx_files\/22003\/3\/content\/html\/RandomWalks.html published example>\r\n% wasn't nutritious enough, Mark totally exceeded my expectations with his\r\n% visualization. Annotating the map of London subway stops with results in 3D\r\n% was not just a crisp, clear way to present results. That was also clever,\r\n% creative and just plain cool!\r\n%%\r\n% To really appreciate this submission be sure to download the code and step\r\n% through it with cell mode execution. Here is a taste of just one of his\r\n% several animations.\r\n%%\r\n% <<..\/images\/pick\/randomwalks.gif>>\r\n%%\r\n% Great demo, Mark. Thanks for posting it.\r\n%%\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2368#respond Comments?>.\r\n\r\n##### SOURCE END ##### 74e05c2d18894b248e13245029c831b6\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n\r\nBob's pick this week is Random Walks by Mark Hoyle.\r\n\r\n&nbsp;\r\n\r\nThis is a really nice demo. I've heard of random walks but never had need to use them so this was educational. Seeing how\r\nthe... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2009\/01\/09\/random-walks\/\">read more >><\/a><\/p>","protected":false},"author":46,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2368"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2368"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2368\/revisions"}],"predecessor-version":[{"id":7335,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2368\/revisions\/7335"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}