At the MATLAB command line, command
mex -setup
and select one of the compilers that shows up.
If no compilers show up, then you need to install a compiler. The appropriate compiler to install will depend upon your MATLAB version and your operating system and whether you are using 32 bit MATLAB or 64 bit MATLAB.