{"id":2391,"date":"2010-03-19T14:43:08","date_gmt":"2010-03-19T13:43:08","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=2391"},"modified":"2010-03-19T14:53:10","modified_gmt":"2010-03-19T13:53:10","slug":"whats-new-in-matlab-2010a","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=2391","title":{"rendered":"What&#8217;s new in MATLAB 2010a?"},"content":{"rendered":"<p>The latest version of <a href=\"http:\/\/www.mathworks.co.uk\/\">MATLAB<\/a> &#8211; MATLAB 2010a &#8211; was released on Friday 5th March.  As always, the full list of changes is extensive but some of the highlights from my point of view include the following.<\/p>\n<p><strong>Bug Fixes<\/strong><\/p>\n<p>MATLAB 2009b contained bugs in some core pieces of functionality.\u00a0 I am now very happy to report that these have been fixed.<\/p>\n<ul>\n<li><a href=\"https:\/\/www.walkingrandomly.com\/?p=1964\">A serious bug in MATLAB 2009b<\/a> fixed in 2010a<\/li>\n<li><a href=\"https:\/\/www.walkingrandomly.com\/?p=1977\">A bug in the sort function<\/a> that affected arrays of complex numbers on some platforms. Fixed in 2010a<\/li>\n<\/ul>\n<p><strong>Parallel and Multicore enhancements<\/strong><\/p>\n<p>Almost everyone<strong> <\/strong>has a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Multi-core_processor\">multicore processor<\/a> these days and they expect programs such as MATLAB to take full advantage of them.\u00a0 However, parallel programming can be hard work and so it is impossible to make every function become &#8216;multicore aware&#8217; overnight.\u00a0 Almost every release of MATLAB gives us a few more functions that make use of our new multicore processors.<\/p>\n<ul>\n<li>Multicore support for several functions from the image processing toolbox.\u00a0 I&#8217;ve added these to my<a href=\"https:\/\/www.walkingrandomly.com\/?p=1894\"> list of known &#8216;multicore aware&#8217; functions<\/a> in MATLAB.<\/li>\n<li>The Fast Fourier Transform function &#8211; fft &#8211; was originally made multicore-aware back in release 2009a and this has been improved on in 2010a.\u00a0 The multithreaded improvements for fft in 2009a were for multichannel Fast Fourier Transforms.\u00a0 In other words, when taking the FFT of a 2D array, MATLAB computes the FFT of each column on an independent thread.\u00a0 The improvements in 2010a actually multithread the calculation of a <strong>single<\/strong> FFT.\u00a0 Mathworks refer to this as &#8220;long vector&#8221; FFT since this speeds up the calculations of a very long fft.<\/li>\n<\/ul>\n<p>Other articles you may be interested in on parallel programming in MATLAB.<\/p>\n<ul>\n<li><a href=\"https:\/\/www.walkingrandomly.com\/?p=1795\">Parallel MATLAB with openmp mex files<\/a><\/li>\n<li><a href=\"https:\/\/www.walkingrandomly.com\/?p=1214\">Parallelisation: Is MATLAB doing it wrong?<\/a><\/li>\n<li><a href=\"https:\/\/www.walkingrandomly.com\/?p=1362\">Supercharge MATLAB with your graphics card<\/a><\/li>\n<li><a href=\"https:\/\/www.walkingrandomly.com\/?p=1894\">A list of multicore functions in MATLAB<\/a><\/li>\n<\/ul>\n<p><strong>Changes to the symbolic toolbox<\/strong><\/p>\n<p>The symbolic toolbox for MATLAB is one of my favourite Mathworks products since it offers so much extra functionality.\u00a0 Most toolboxes are just a set of .m MATLAB files but the symbolic toolbox includes an entire program called MUPAD along with a set of interfaces to MATLAB itself.\u00a0 Lets look at some of the enhancements developed in 2010a in detail.<\/p>\n<ul>\n<li>MuPAD demonstrates better performance when handling some linear algebra operations on matrices containing symbolic elements.  Let&#8217;s look at symbolic Matrix Inversion for example.  Take the following piece of MUPAD code\n<pre>x:= 1 + sin(a) + cos(b):\r\nA:= matrix( [ [11\/x + a11, 12\/x + a12, 13\/x + a13, 14\/x + a14],\r\n              [21\/x + a21, 22\/x + a22, 23\/x + a23, 24\/x + a24],\r\n              [31\/x + a31, 32\/x + a32, 33\/x + a33, 34\/x + a34],\r\n              [41\/x + a41, 42\/x + a42, 43\/x + a43, 44\/x + a44] ]):\r\ntime((B:= 1\/A))*sec\/1000.0;<\/pre>\n<p>On my machine, 2009a did this calculation in 61.1 seconds whereas 2010a did it in 0.9 seconds.  That&#8217;s one heck of a speedup!<\/li>\n<li>Enhanced simplification functions, simplify and Simplify, demonstrate better results for expressions involving trigonometric and hyperbolic functions, square roots, and sums over roots of unity.\u00a0 There&#8217;s a lot of improvements packed into this one bullet point but I&#8217;ll just focus on one particular example.\u00a0 Take the following MUPAD code.\n<pre>f:= -( ((x + 1)^(1\/2) - 1)\r\n      *((1 - x)^(1\/2) - 1)*(4*x*(x + 1)^(1\/2) + 8*(1 - x)^(1\/2)*(x + 1)^(1\/2) + 4*(x + 1)^(1\/2)\r\n     + 12*(x + 1)^(3\/2) - 4*x*(1 - x)^(1\/2) + 4*(1 - x)^(1\/2) + 12*(1 - x)^(3\/2) - 8*x^2 - 40)\r\n     ) \/(6*((x + 1)^(1\/2) + (1 - x)^(1\/2) - 2)^3)\r\n     - (1\/3*(x + 1)^(3\/2) + 1\/3*(1 - x)^(3\/2)):\r\nsimplify(f)<\/pre>\n<p>If you evaluate this in the MUPAD notebook of release 2009b then you get a big mess.  Evaluating it in 2010a, on the other hand, results in 0.  Much tidier!<\/li>\n<li>Polynomial division has improved functionality.  In R2009b it was not possible to divide multivariate polynomials with remainder,only exact division was possible.  R2010a returns the quotient and the remainder.  Consider the following MUPAD code.\n<pre>q := poly(x+y^2+1):\r\np := poly(x^2+y)*q + poly(y^3+x)*q + poly(x^2+y^2+1):\r\ndivide(p, q);<\/pre>\n<p>2009b MUPAD just gives an error message<\/p>\n<pre>Error: Illegal argument [divide]<\/pre>\n<p>2010a,on the other hand, gives us what we want returning the quotient and the remainder.<\/p>\n<pre>poly(x^2 + 2*x + y^3 - y^2 + y - 1, [x, y]), poly(y^4 + 3*y^2 + 2, [x, y])<\/pre>\n<\/li>\n<li>The symbolic ODE solver in MUPAD now handles many more equation types.  Here&#8217;s a particular example of a 2nd order linear ODE with hypergeometric solutions that can now be solved.<\/li>\n<pre>eq:= x^2*(x^2+1)*diff(y(x),x,x)+x*(2*x^2+1)*diff(y(x),x)-(nu*(nu+1)*x^2+n^2)*y(x);\r\nsolve(ode(eq,y(x)))<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.walkingrandomly.com\/images\/mupad\/mupad_hypergeometric_ode2.png\" alt=\"MUPAD ODE solution\" \/><\/p>\n<p>This is just a small selection of the enhancements that The Mathworks have made to the symbolic toolbox which is coming along in leaps and bounds in my humble opinion.\u00a0 Thanks to various members of staff at The Mathworks for supplying me with these examples (and a fair few more besides).  I wouldn&#8217;t have been able to make this post without them.<\/ul>\n<p>Other articles on Walking Randomly about the symbolic toolbox for MATLAB:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.walkingrandomly.com\/?p=178\">Review of the new symbolic toolbox in MATLAB 2008b<\/a> (written just after the transfer from a Maple symbolic engine to the new Mupad one)<\/li>\n<\/ul>\n<p><strong>Changes to the Optimization toolbox<\/strong><\/p>\n<ul>\n<li>The fmincon function now has a new algorithm available.\u00a0 The algorithm is called <tt>SQP<\/tt> which stands for Sequential Quadratic Programming.  I don&#8217;t know much about it yet but may return to this in the future.<\/li>\n<\/ul>\n<p><strong>Licensing changes<\/strong><\/p>\n<p>Licensing and toolbox naming might be dull for most people &#8211; but it is a big deal to me since I work in a team that administers a large network license for MATLAB.\u00a0 Changes that might seem minor to most people can result in drastic improvements for the life of a network license administrator.\u00a0 On the other hand, some changes can result in massive amounts of work.<\/p>\n<ul>\n<li>Solaris as a network license platform was dropped.\u00a0 This is a shame because although my employer has very few Solaris client machines, it currently runs its MATLAB license server on Solaris and it has been (and continues to be) rock solid.\u00a0 Now we are going to have to move to Windows license servers and update every single client machine on campus before we can update to 2010a.\u00a0 Oh joys!<\/li>\n<li>The Genetic Algorithm and Direct Search toolbox is no more.\u00a0 It&#8217;s functionality is now part of the Global Optimization Toolbox.\u00a0 I&#8217;ve not used this one myself yet but it does have a small core set of users at my university.<\/li>\n<\/ul>\n<p>Articles aimed at users of MATLAB network licenses include<\/p>\n<ul>\n<li><a href=\"https:\/\/www.walkingrandomly.com\/?p=2383\">More MATLAB statistics toolbox licensing woes (and how to solve them)<\/a><\/li>\n<li><a href=\"https:\/\/www.walkingrandomly.com\/?p=2351\">An alternative to binopdf using the NAG toolbox for MATLAB<\/a><\/li>\n<\/ul>\n<p>Much of the fine detail in this article was provided to me by members of staff at The Mathworks.\u00a0 I thank them all for their time, patience and expertise in answering my incessant questions.\u00a0 Any mistakes, however, are my fault!<\/p>\n<p>If you enjoyed this article, feel free to <a href=\"http:\/\/feeds.feedburner.com\/WalkingRandomly\">click here to subscribe to my RSS Feed.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The latest version of MATLAB &#8211; MATLAB 2010a &#8211; was released on Friday 5th March. As always, the full list of changes is extensive but some of the highlights from my point of view include the following. Bug Fixes MATLAB 2009b contained bugs in some core pieces of functionality.\u00a0 I am now very happy to [&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":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,11],"tags":[],"class_list":["post-2391","post","type-post","status-publish","format-standard","hentry","category-math-software","category-matlab"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-Cz","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/2391","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=2391"}],"version-history":[{"count":14,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/2391\/revisions"}],"predecessor-version":[{"id":2407,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/2391\/revisions\/2407"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}