{"id":5434,"date":"2014-05-16T14:20:11","date_gmt":"2014-05-16T13:20:11","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=5434"},"modified":"2014-05-16T14:20:11","modified_gmt":"2014-05-16T13:20:11","slug":"chapter-1-of-the-matlab-guide-converted-to-ipython-notebook","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=5434","title":{"rendered":"Chapter 1 of &#8216;The MATLAB Guide&#8217; converted to IPython notebook"},"content":{"rendered":"<p>One of <a href=\"https:\/\/www.walkingrandomly.com\/?p=2866\">my favourite MATLAB books<\/a> is The MATLAB Guide by Desmond and Nicholas Higham. The first chapter, called &#8216;A Brief Tutorial&#8217; shows how various mathematical problems can be easily explored with MATLAB; things like <a href=\"http:\/\/en.wikipedia.org\/wiki\/Continued_fraction\">continued fractions<\/a>,<a href=\"http:\/\/en.wikipedia.org\/wiki\/Random_Fibonacci_sequence\"> random fibonacci sequences<\/a>, <a href=\"http:\/\/en.wikipedia.org\/wiki\/Fractal\">fractals<\/a> and <a href=\"http:\/\/en.wikipedia.org\/wiki\/Collatz_conjecture\">collatz iterations<\/a>.<\/p>\n<p>Over at the SIAM blog, Don MacMillen, demonstrates how its now possible, trivial even, to <a href=\"http:\/\/blogs.siam.org\/from-matlab-guide-to-ipython-notebook\/\">rewrite the entire chapter as an IPython notebook<\/a> with all MATLAB code replaced with Python.<\/p>\n<p>The notebook is <a href=\"https:\/\/gist.github.com\/macd\/10562695\">available as a gist<\/a> and can be <a href=\"http:\/\/nbviewer.ipython.org\/gist\/macd\/10562695\">viewed statically on nbviewer<\/a>.<\/p>\n<p>What other examples of successful MATLAB-&gt;Python conversions have you found?<\/p>\n<p><a href=\"http:\/\/nbviewer.ipython.org\/gist\/macd\/10562695\"><img decoding=\"async\" alt=\"MATLAB guide in IPython\" src=\"https:\/\/www.walkingrandomly.com\/images\/python\/MATLAB_Ipython.png\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of my favourite MATLAB books is The MATLAB Guide by Desmond and Nicholas Higham. The first chapter, called &#8216;A Brief Tutorial&#8217; shows how various mathematical problems can be easily explored with MATLAB; things like continued fractions, random fibonacci sequences, fractals and collatz iterations. Over at the SIAM blog, Don MacMillen, demonstrates how its now [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,11,7,31],"tags":[],"class_list":["post-5434","post","type-post","status-publish","format-standard","hentry","category-math-software","category-matlab","category-programming","category-python"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-1pE","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/5434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5434"}],"version-history":[{"count":4,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/5434\/revisions"}],"predecessor-version":[{"id":5464,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/5434\/revisions\/5464"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}