Page 1
Aside

How slow is MATLAB really?

A couple of days ago, I wrote a quick post discussing the usage of CPLEX instead of MATLAB’s built in solvers. CPLEX is a proprietary tool that is developed by IBM and is capable of solving certain types of problems much, much quicker – especially when the number of search parameters becomes large. As an addendum to my previous findings, in the post where I bashed MATLAB and praised CPLEX (link), I herewith would like to continue my bashing, based on yet another bottleneck that I discovered in MATLAB: populating space matrices.

Continue Reading →

The end
Standard

IBM to the rescue

Our research laboratory uses a large variety of programming and scripting languages to run simulations, mine data, analyse results and find optimised solutions. The two languages I begun to like most are MATLAB and Python. They both are easy to lean and use, and they both have powerful toolboxes and modules that extend the basic functions of MATLAB and Python, respectively. Nonetheless, for most initial implementations we frequently choose MATLAB over Python since it provides a (in my view) cleaner way to do large matrix manipulation and complex optimisation calls. Once we solved the problem on a theoretical level, we then proceed to stage two, where Python accelerates the computation (especially when we deploy it on our compute cluster HTCondor).

However, with the most recent problem we had to tackle, transition from step one to step two was not straight forward. We had to assure all components operate correctly, and that our solver could find a solution. Yet with an increasing number of input parameters, the developed procedure took more and more time to solve. In fact, the increase in time was exponential as the number of parameters increased – not good. So what could we do now?

Deadlines were coming up and we needed to solve problems lasting several weeks, however a solution may only be returned after several days of computation. At this hopeless moment in time, one of my colleagues suggested an amazing tool called CPLEX by IBM; she really saved us, because it’s free for academics and works so much quicker than MATLAB  (get it here). So, if you are interested in the mathematical problem we wanted to solve, why it is difficult to solve it, how CPLEX performed in comparison to native MATLAB solvers, and how to acquire CIPLEX and use it within your MATLAB code, then you have come to the right post. Continue Reading →

The end