## What’s new in MATLAB 2010a?

March 19th, 2010 | Categories: math software, matlab | Tags:

The latest version of MATLAB – MATLAB 2010a – 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.  I am now very happy to report that these have been fixed.

Parallel and Multicore enhancements

Almost everyone has a multicore processor these days and they expect programs such as MATLAB to take full advantage of them.  However, parallel programming can be hard work and so it is impossible to make every function become ‘multicore aware’ overnight.  Almost every release of MATLAB gives us a few more functions that make use of our new multicore processors.

• Multicore support for several functions from the image processing toolbox.  I’ve added these to my list of known ‘multicore aware’ functions in MATLAB.
• The Fast Fourier Transform function – fft – was originally made multicore-aware back in release 2009a and this has been improved on in 2010a.  The multithreaded improvements for fft in 2009a were for multichannel Fast Fourier Transforms.  In other words, when taking the FFT of a 2D array, MATLAB computes the FFT of each column on an independent thread.  The improvements in 2010a actually multithread the calculation of a single FFT.  Mathworks refer to this as “long vector” FFT since this speeds up the calculations of a very long fft.

Other articles you may be interested in on parallel programming in MATLAB.

Changes to the symbolic toolbox

The symbolic toolbox for MATLAB is one of my favourite Mathworks products since it offers so much extra functionality.  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.  Lets look at some of the enhancements developed in 2010a in detail.

• MuPAD demonstrates better performance when handling some linear algebra operations on matrices containing symbolic elements. Let’s look at symbolic Matrix Inversion for example. Take the following piece of MUPAD code
x:= 1 + sin(a) + cos(b):
A:= matrix( [ [11/x + a11, 12/x + a12, 13/x + a13, 14/x + a14],
[21/x + a21, 22/x + a22, 23/x + a23, 24/x + a24],
[31/x + a31, 32/x + a32, 33/x + a33, 34/x + a34],
[41/x + a41, 42/x + a42, 43/x + a43, 44/x + a44] ]):
time((B:= 1/A))*sec/1000.0;

On my machine, 2009a did this calculation in 61.1 seconds whereas 2010a did it in 0.9 seconds. That’s one heck of a speedup!

• Enhanced simplification functions, simplify and Simplify, demonstrate better results for expressions involving trigonometric and hyperbolic functions, square roots, and sums over roots of unity.  There’s a lot of improvements packed into this one bullet point but I’ll just focus on one particular example.  Take the following MUPAD code.
f:= -( ((x + 1)^(1/2) - 1)
*((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)
+ 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)
) /(6*((x + 1)^(1/2) + (1 - x)^(1/2) - 2)^3)
- (1/3*(x + 1)^(3/2) + 1/3*(1 - x)^(3/2)):
simplify(f)

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!

• 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.
q := poly(x+y^2+1):
p := poly(x^2+y)*q + poly(y^3+x)*q + poly(x^2+y^2+1):
divide(p, q);

2009b MUPAD just gives an error message

Error: Illegal argument [divide]

2010a,on the other hand, gives us what we want returning the quotient and the remainder.

poly(x^2 + 2*x + y^3 - y^2 + y - 1, [x, y]), poly(y^4 + 3*y^2 + 2, [x, y])
• The symbolic ODE solver in MUPAD now handles many more equation types. Here’s a particular example of a 2nd order linear ODE with hypergeometric solutions that can now be solved.
• 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);
solve(ode(eq,y(x)))

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.  Thanks to various members of staff at The Mathworks for supplying me with these examples (and a fair few more besides). I wouldn’t have been able to make this post without them.

Other articles on Walking Randomly about the symbolic toolbox for MATLAB:

Changes to the Optimization toolbox

• The fmincon function now has a new algorithm available.  The algorithm is called SQP which stands for Sequential Quadratic Programming. I don’t know much about it yet but may return to this in the future.

Licensing changes

Licensing and toolbox naming might be dull for most people – but it is a big deal to me since I work in a team that administers a large network license for MATLAB.  Changes that might seem minor to most people can result in drastic improvements for the life of a network license administrator.  On the other hand, some changes can result in massive amounts of work.

• Solaris as a network license platform was dropped.  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.  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.  Oh joys!
• The Genetic Algorithm and Direct Search toolbox is no more.  It’s functionality is now part of the Global Optimization Toolbox.  I’ve not used this one myself yet but it does have a small core set of users at my university.

Articles aimed at users of MATLAB network licenses include

Much of the fine detail in this article was provided to me by members of staff at The Mathworks.  I thank them all for their time, patience and expertise in answering my incessant questions.  Any mistakes, however, are my fault!

1. Though the new version includes improvements in mupad, I still need to go back to R2007b to get the symbolic integral of a large number of problems that occur in the statistics of data processing — specifically computing the allan variance for various waveforms. In (R2007b), the answer for the test case comes up quickly:

syms x;
int((sin(x)*sinc(x))^2,x,0,inf) ans = 1/4/pi

While R2010a takes a minute before giving up with “Explicit integral could not be found.”

2. Odd we missed the dropping of Solaris as a license platform. We are currently using 2010b licenses managed by Solaris. I am using the Matlab R2009b lm_matlab for the MLM without any problems.

3. Hi Nash

I’m glad to hear that it works. However, it is not supported. With something as important as MATLAB, my team prefers to always use only the supported option.

Cheers,
Mike