top | item 1726406

What do you think about matlab?

6 points| gsivil | 15 years ago | reply

This is the first time that I post something here, and it is not a long time since I accidentally found online the website.(The last sequence of events that brought me here in fact: Red the book of Levy, browsed other similar books in a bookstore, found PG book about H and painters, google PG, and here I am..)

My background is in electrical and computer engineering, optics/physics. I have never worked in industry and my experience has been only in academia. I am not a programmer and I guess I will never be. I have said the 'hello, world' in a few languages, operating systems, open-source electronic projects, communication platforms etc but that pretty much is as far as I have ever been. I spend some hours in the night on computers the same way people solve sudoku- just to keep my brain from getting idle when I am tired from work. After the long background fluff:

What do you think about matlab?

As far as I know it is not a general purpose language and maybe from the perspective of computer science it is not an interesting example. But-practically speaking- it is the program/programming environment that is used more extensively than anything else in academia(engineering, physics, biology etc) for scientific simulations and data visualization. In data visualization in my experience is second to none. I have tried some of the libraries of python but I do not think that they have reached the maturity level of the matlab plotting libraries. I know that for example C/C++ is big in science too (most of the times for projects in the order of several thousand lines) but then you will need extra graphics libraries for visualization. It seems that matlab is the standard in academia and it gets bigger and bigger. I like python and I hope that it will eventually take over but I do not see it happening any time soon.

5 comments

order
[+] ludwigvan|15 years ago|reply
The real power of MATLAB comes from the toolboxes, not the language itself.

Writing performance critical sections in C code (mex files in MATLAB) has improved speed dramatically in the cases I have tried (by an order of magnitude.)

I have found that line by line porting of MATLAB code to Python is trivial if you don't use toolboxes, the most annoying part in the porting is 1 indexing.

The biggest advatnage besides toolboxes is the IDE support of MATLAB. Ipython + emacs + matplotlib can emulate that, but still for most people, it is too much of a hassle.

[+] elbenshira|15 years ago|reply
Python and Matlab are two different beasts, and it's not really fair to compare both of them side-by-side. If you want to Get Stuff Done (tm), then I say go ahead and use Matlab. I've used it for computer vision projects in the past, and it was good enough for me. Sure, my algorithms took forever to complete, but Matlab is a scripting language not optimized for speed (though I think you can compile .m files).

But if you want to learn how to program properly, then I would stay away from Matlab. The language has some weird design choices that most programming languages do not follow (e.g. indicies start at 1 in Matlab instead of 0 everywhere else; syntax for setting up functions are odd; and other deeper issues). Go learn Python instead. Once you know Python, learning Matlab is super easy.

And it seems that Python is gaining more attention in the academic world. I know it is used heavily in computational bio, natural language processing, and other places.

http://matplotlib.sourceforge.net/

http://vnoel.wordpress.com/2008/05/03/bye-matlab-hello-pytho...

http://www.sagemath.org/

[+] bustamove|15 years ago|reply
And you forgot to add that Python is the "de facto" language used by google, along with C/C++ for their whole mind boggling distributed computing system. They even have hired Guido Van Rossum, the creator of Python.
[+] demallien|15 years ago|reply
At the moment, the biggest challenger to Matlab is definately Python. The two choices have different strengths and weaknesses. Matlab has had a lot of work done on providing specialised modules to do the heavy lifting for signal processing, simulations, etc. If your work is very heavily oriented towards theory, it's probably the best fit.

Python on the other hand is a general purpose programming language. If you are doing real-world work, Python will greatly simplify the task of reading in data, and getting it into a format that you can do mathematical analysis on. Getting data off a server, for example, or changing the format of data is much simpler in Python than it is in Matlab. The mathematical analysis side of things isn't as developed, and even when the modules exist, the documentation is often lacking.

So really it depends on what kind of work you are trying to do. These days I find Python's maths support good enough that I rarely miss the sorts of things you can find in Matlab, but then I am generally doing real world stuff, interfacing to weird systems, and looking for decent performance. Someone doing more theoretical research may prefer the more flexible mathematical tools available in Matlab.