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 →

more
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 →

more
more
Aside

e – like everywhere

Everybody doing any kind of geometry, calculus or higher algebra will have stumbled over this number:

2.71828182845904523536028747135266249775724709369995…

More commonly it is known as e, Euler’s number. You may wonder, where does this number come from and why is it so important? Well… If you are like me that is: waiting for simulations to finish, having 20 minutes of spare time on your hands, and having a tenacious drive to understand things. So come along as I explain two different ways that result explain where this beautiful number comes from.

Continue Reading →

more
Standard

MATLAB® and Objects

Working with objects once a project becomes sufficiently complex makes it much easier to keep track of things. MATLAB® (a.k.a. MATrix LABoratory) is a nice product by a company called MathWorks that makes matrix manipulation incredibly easy. For us engineers and academics it is the standard goto, regardless if we need to rapid prototype some functionality or develop a complex and convoluted system. Only recently did I discover a whole hidden side of  MATLAB®: classes! And because I am an incredibly big fan of those beasts I decided to write a quick summary of how to use them.

Continue Reading →

more