Stefan Karlsson/PersonalPage/mex VS tutorial


Tutorial on Setting up your first Mex file, and the matlab toolbar in Visual Studio

Get the VS extension version

The visual studio extension version is for versions 2010 and 2012 of visual studio (the supported compilers, as of Matlab 2013).

Get the required code

This excercise is all about getting Started setting up Matlab with visual studio for using mex files, command line options for Matlab, thin clients and some taste of how mex files look like. It is part of the course Effecient Matlab coding at Halmstad University, designed and maintained by Stefan Karlsson. Email me if you have questions or comments, at

Video Tutorial

Video Part 1(starts 30 seconds in):


Video Part 2:


Video Part 3:


Video Part 4: