Create MATLAB readable avi from bmp frames

Use the following command

This will convert all the files airport1000.bmp to airport1200.bmp to an avi file.

Using mencoder will allow you to chose the framerate:

access (lot of small) functions residing in one MATLAB m file

Usually, you create one m-file for one MATLAB function. But what to do if you have many small functions? It’s odd to create a lot of files which just contain some lines of code. The other approach is to put the small functions just inside the m file where they are called from. This is a good solution, as long as you don’t have to access the same functions from multiple m-files!

So if you need to access many functions, which all reside in one m-file, just use the object oriented approach, by defining a Class and static methods:

Now, wherever you need to call any function of MyClass, just use:

Compile MATLAB functions in C and link them with Intel MKL CBLAS

The MATLAB utility “mex” (enter “help mex” in command window in MATLAB) is a wrapper for your actual compiler, like gcc. It does not support intels icc. But this is no reason not to use the Intel MKL libraries! Write your code and compile it with:

Looks ugly, but is just a matter of copy pasting from the following website. Then gcc will compile your code and link the Intel libraries! The linking process is somewhat tricky, therefore use

to determine everything after the file name in the compiling command. Remember to select static linking on the website.

start MATLAB in command line mode from bash/linux console

Sometimes I want to start matlab without having the (lame) X interface. Instead of, I just use the command line. For this purpose, just run:

Or even easier, by adding a small script in /$MATLAB_HOME/bin maybe named “matlabnoX” with the content above. Make sure to chmod the file such that it is runnable!