/*!
\page mexfiles How to write and use mex files for Matlab

\section use Howto use predefined mexfiles 

A range of mexfiles is predefined in directory \c library/mex.
Many of these mexfile process ui files (see \ref ui_page) examples of these files are in directory \c library/tutorial.
Note that in order to run these files you need to let matlab know where to find them:
\code
>> addpath path_to_bdm/library/mex
\endcode

Then, you can go to \c library/tutorial  and run e.g. \c arx_test_mex.

\section write Howto write custom mex file

Due to special nature of the mex files, the mex file can be split in three parts:
\li input conversion, where input arguments are converted to IT++ structures,
\li main body of algorithm, where any C++ bdm constructions can be used,
\li output conversion, where resulting IT++ structures are converted to mxArrays.
 
The first and the third part is achieved using prepared IT++ routines, see IT++ documentation.

Script \c ./buildmex is prepared to compile and link the mexfile with bdm. 
\code
$ ./buildmex.sh my_mex_file.cpp
\endcode
on Linux, or 
\code
$ ./buildmex.bat my_mex_file.cpp
\endcode
on Windows.

Example of a mexfile:
\include arx1d.cpp
*/
