Introduction - If you have any usage issues, please Google them yourself
A Short MEX Tutorial and Demo
These functions allow you to program in C or C++ (ultra fast languages), but be able to call and use them from Matlab programs. This post is a short intro to mex files which should get you up and running.