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.
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
Python. They both are easy to lean and use, and they both have powerful toolboxes and modules that extend the basic functions of
Python, respectively. Nonetheless, for most initial implementations we frequently choose
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 →
Now since my friends and I have successfully passed our certification exam to become official MATLAB® professionals, I wanted to share some nifty tricks to deal with optional, missing or false arguments in MATLAB®.
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.
This will be a short post, but a little wakeup call for myself, and others that may get annoyed by the same issue. The issue at hand is, that MATLAB does not seem to have fully functioning intellisense/auto-complete when dealing with a class definition that spans over multiple files. Let me elaborate…