# Matlab

[Matlab] is the language I use for most of my work programs. It is designed for scientific computing, in particular working with matrices (hence the name).

The advantage of Matlab is that it is easy to define and work with matrices, including large sparse matrices. Common engineering or physics tasks such as evolving a system of differential equations using an ODE solver are built in to the system, and the plotting functions are easy to use (although getting things to look exactly the way you want involves hacking around with the object handles of the figure, the sub-axes of the figure, their sub-axes, etc).

The main problem I had with Matlab prior to version 7 was that it felt like more of a scripting language than a true programming language. This was because the basic programming unit was a file defining a set of Matlab commands, with no higher level interaction between functions than calling functions from within a given function. Script files polluted the global namespace with global variable declarations, while files defined as functions could not access the variables of other functions apart from those variables being passed as parameters (ignoring the somewhat hackish method of declaring variables global within functions). Matlab 7 introduced nested functions and function handles, which makes it a lot nicer language to program.