mex -setup %choose compiler
mex mycode.c %call the function
If you need to add other cpp files and lib files while compiling in Matlab:
mex cpp-file-for-matlab.cpp ../addthis.cpp ../addthat.cpp -laddlibrary
mex mycode.c %call the function
If you need to add other cpp files and lib files while compiling in Matlab:
mex cpp-file-for-matlab.cpp ../addthis.cpp ../addthat.cpp -laddlibrary