MATLAB: How to make mex file of C program in matlab

huff2mat.munravel.c

I have to run a matlab code namely "huff2mat.m" but it uses a C file namely "unravel.c". It also asks me to make a mex file of it. How can i use the file "unravel.c" in matlab.

Best Answer

if it is mex file, its mean C code for matlab. then simply compile it by this command in matlab editor.
mex unravel.c;
then you can call unravel as function in matlab.