Using Matlab was a mistake.

Because it is not free.

I think its awesome. Image processing, handling really large matrices, creating GUIs… It’s a very well-rounded tool and the learning curve is almost non-existent (you start doing really crazy stuff with no effort). There is tons of documentation, there are lots of users and user-created content. There are tons of forums and places you can get help. You can pay mathworks for help… Its fast if you take advantage of matrix calculations (Don’t touch a for loop, it will take for ever). It does have some downsides, but overall it’s an excellent tool to work with.

The problem is that it’s not free. Please don’t misunderstand me. I’m not going to start a movement that might eventually coerce Mathworks into releasing a GPL version of Matlab. I’m not interested in creating a new interpreter that will run Matlab scripts (It has already been done: Octave). I’m not mad at Mathworks. As far as I know they have all the right to charge some money for their cool product. Now that I think of it, I indirectly payed for the license through my taxes to the Danish government that ultimately ended up paying for the campus license that I am using.

No, I’m not mad at all those things. What pisses me off is that there is one more reason NOT to use my code. It’s actually a pretty big deterrent for prospective users. Think of it this way: If someone wants to use my code (In a legal manner), they have to pay a Matlab license. In their mind, my code will cost them whatever the Matlab licence costs (which depends on specific situations). Moreover there is no easy way that the user can “try out” my code. They would have to know that there is a possibility of getting Matlab for 15 trial, they would have to know where to go to get it and they would have to be willing to go through the pain of filling out forms (Its possible, but they need to jump through hoops).

It would be much easier if it were just free and open.


About joelgranados

I'm fascinated with how technology and science impact our reality and am drawn to leverage them in order to increase the potential of human activity.
This entry was posted in annotation and tagged , , , . Bookmark the permalink.

12 Responses to Using Matlab was a mistake.

  1. If your university has a MATLAB compiler license, you could use that to distribute freely downloadable and usable binary versions of your application.

    The compiled version will need the MATLAB compiler runtime to work but this is a free download as of 2012a

    Not as good as an open platform but still useful.

    • joelgranados says:

      Hey Mike.

      Thx for the heads up. I did not know this was possible. I just compiled on my Linux box (I followed and it works a little. I ran into some issues:

      1. While executing the code through the Matlab interpreter is flawless, running the resulting binary does not give the same result. It outputs some errors that I had never encountered while working on the interpreter. Hopefully this is either bugs in my code or compilation steps that I missed. I would say that 10% of the program worked.

      2. I want to give the generated binary to people working on windows. This means that I would have to compile it on a windows box with an additional Matlab installed. I don’t deny that this is a bit of a hassle, but what bothers me more is that this is what I wanted to avoid in the first place (compiling for each platform). One of the fortes of Matlab is that I don’t need to worry about where it will be executed. It should just work (Windows, Linux, Mac?). I might as well code it in C++ and avoid the interpreter layer all together.

      Taking these two points into consideration, I’ll still try to make it work :)

      Mike: Very usefull, thx again!

  2. Dima says:

    IMHO Matlab’s greatness is a bit overhyped. Cf. e.g.

  3. Ryan Feeley says:

    I think you just have to consider the situation with your eyes wide open. If you are primarily developing code that would be used by others, than the value of your product would generally be higher if it did not depend on others having MATLAB access. However, if you are using MATLAB to solver problems in your research, for your employer, of for your clients, then you just have to consider whether that 3k a year software cost increases your productivity a corresponding amount relative to your compensation. For me the answer is typically yes. The disruption in my work flow of having to jump in to some clunky product that wasn’t developed to keep a paying customer happy is often more damaging than the time involved using another solution. If I use MATLAB, I can estimate the time required to complete the task. If I try to cludge something together in octave or python or C++ it is much harder to estimate and breaks up my flow. Now those are all great products for the problem they were designed to solve. (free, portability, readability, speed, graphics, etc) it just isn’t usually my problem. YMMV.

    • joelgranados says:

      Hey Ryan

      Thx for your comment. You make very valid points: 1) In your case paying license fees increases your productivity relative to your compensation, 2) using “clunky” products that don’t have the customers happiness in mind disrupts your work-flow, 3) you can estimate more accurately using MATLAB and 4)your problems are not usually free, portability, readability, speed, graphics …
      Lets take them in order:

      1) I find that productivity is very important and also very personal. In my case I use MATLAB and R interchangeably and I find my productivity levels similar in both environments (read this as “I have the same knowledge about both”). And comparing productivity is always tricky; you might spent a bit more doing an algorithm in a “clunky” environment, but it might be worth your while (and your customer’s) if the end product is a bit faster. What I’m saying is that it depends :)

      2) The only thing I want to point out here is that “happiness” means different things to different people. What if your customers want free, portable, readable, speed, graphics… ?

      3) I think this one depends on how well you know an environment. If you have worked with C++ all your life, it will be very easy to do estimations. The ability to make estimations does not really depend on the environment, it depends on your experience and judgement.

      4) Have nothing to add on this one :)

      Your comment is greatly appreciated as it shows that the choice of environment is very personal and while for some MATLAB is the way to go, it gave me headaches when trying to use it with people that did not have a license. This affected a collaboration that was very important in the development of my Ph.D. and therefore still think that it was a mistake to use MATLAB for the GUI.

  4. Matt says:

    I also use Matlab and R interchangeably. It’s mainly personal, but I find matlab much more user friendly. The debugging tools are better, the built in editor is great, the GUI is better than Rstudio (the closest comparable thing to the matlab GUI for R). In my opinion R’s documentation is not as friendly as matlab’s help files either, and of course the graphics. One amazing thing about Matlab is being able to edit plots in the Gui. Plotting in R can be a bit of a pain. Now I still love R. You can’t find some of the state of the art statistical tools, that are currently available in R packages, in matlab, even if you paid for one of their special toolboxes. I also find R’s bracket indexing for matrices much more natural. Parentheses indexing when combined with functions can make code look awfully messy.

    I am a bit of a pessimist at times, so I often think if god forbid I ever end up being unemployed for a period of time, I will always be able to use R. This is not so with Matlab (although a personal license is much less expensive than an academic or industry license).

    For those of us who work with biologists, no one has a matlab license and this is the main reason why I use R. Like you, I do not want to go through the trouble of creating compiled code for ever platform and then in addition what if my collaborator who doesn’t have a Matlab license wants to modify the code. For this reason, when ever I have a collaborator I almost always use R, and I have been moving more and more towards the R direction as time goes on. I may eventually take the time to learn some python, but until then R seems to be the best option for me.

    • joelgranados says:

      Hey Matt.

      Thx for taking the time to comment, it’s always great to hear others point of view. I agree with your comments! and want to add that it is sometimes hard to choose the alternatives. I’m currently working on a project that ended up being coded on Matlab because it began its life as Matlab. The transition to something different like Python or R is difficult given that there are several parties involved and the transition might not appeal to all of them.

  5. Yann says:

    Hey Joel, Have you already tried on using SCILAB ? It is Open Source, and might fulfill your needs:

    • joelgranados says:

      Hey Yann.

      I have not had the chance to try out Scilab nor Octave and its a shame because each could have unique characteristics that I need and have not been able to find in Matlab or R. I blame lack of time for my negligence and hope that I’ll get an opportunity to try them in the future. Thx for the reminder :)

  6. George says:

    If Matlab was free, it wouldn’t have existed for you to write your code in the first place.
    In the real world, people work for money so that can pay for food, clothes, shelter, health, transportation and entertainment.
    You need to start acknowledging that the world is a real place where nothing truly is free and people need to work for cash. This is not a video game, which by the way, those are also not free.

    • joelgranados says:

      Hey George.

      Thx for the comment. I now realize that my post might have come out as a bit of a rant. This was not my intention; I just wanted to share how the cost of a license affected what could have been a smooth collaboration.
      I totally agree that ppl should get payed for their work and I’m grateful that there are options out there that allow me to use software without paying for a licences (R, Octave, Python …).

  7. dhaneshr says:

    I am a university professor in Computer Science and used to be a die-hard MATLAB user for almost 15 years. Then I discovered Scientific Python Distribution. Its suite of Numpy, Scipy, IPython and the availability of Python wrappers for a many open source projects has prompted me to change to Python almost exclusive. It may take a while…but what I’m seeing with Python is really promising.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s