CMake/MatlabMex: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
(Replace content with link to new CMake community wiki)
 
(25 intermediate revisions by 5 users not shown)
Line 1: Line 1:
=What are Matlab mex files?=
{{CMake/Template/Moved}}


Mex files are functions written in C or C++ that are callable in the Matlab scripting language in a Matlab interpretor.  [http://www.mathworks.com/matlab Matlab] is a 'Matrix Laboratory', a general purpose scientific scripting language owned by [http://www.mathworks.com The Mathworks] company.
This page has moved [https://gitlab.kitware.com/cmake/community/wikis/doc/tutorials/MatlabMex here].
 
Details of writing mex files can be found in the [http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/bp_kqh7.html Matlab documentation].
 
==Before you begin==
 
Matlab is a language with a good syntax for working with matrices, a variety of functions, excellent documentation, and it is ubiquitous throughout the academic, scientific community.  On the other hand, it is extremely slow, has poor memory utilization, is prohibitively expensive, sees little use outside academia, has a language syntax that is only good for simple procedural scripting, is closed source, and has numerous bugs.  Writing mex files is often an attempt to address some of these limitations -- speed and memory usage.  However, it is a difficult and not very elegant solution.  Instead, researchers should consider using superior products, such as [http://scipy.org SciPy], [http://www.scilab.org SciLab], [http://www.sagemath.org/ Sage], or [http://www.gnu.org/software/octave/index.html Octave].
 
=Why would you want to use CMake for creating mex files?=
 
=How do you use CMake with Matlab?=
 
=Hello World Example=
 
=More complex example: ITK based image reader=
 
=Platform specific issues=

Latest revision as of 15:40, 30 April 2018


The CMake community Wiki has moved to the Kitware GitLab Instance.

This page has moved here.