MATLAB: Bit Plane En Coder

image compression

I got the code for "Bit Plane Encoder" from the author's site http://hyperspectral.unl.edu/download.htm
but it is written in C…. how can i run this code in matlab?? please can someone reply me with how to run that code in Matlab.. i'm using version 7.9 and WINDOWS… please do reply me…. it would be of great help to me….

Best Answer

C code cannot be directly run in MATLAB. You can, though, compile the C code into a library and use loadlibrary() to make it available; or you can create a mex interface to the code and place calls to that.
I wonder if your real question is about how to recode that algorithm in MATLAB.