A researcher has created a small simulation in MATLAB and we want to make it accessible to others. My plan is to take the simulation, clean up a few things and turn it into a set of functions. Then I plan to compile it into a C library and use SWIG to create a Python wrapper. At that point, I should be able to call the simulation from a small Django app. At least I hope so.
Do I have the right plan? Has anyone else done something similar? Can you let me know if there are any serious pitfalls that I'm not aware of at the moment?
I'd also try ctypes first. 

Use the Matlab compiler to compile the code into C. 
Compile the C code into a DLL.
Use ctypes to load and call code from this DLL

The hardest step is probably 1, but if you already know Matlab and have used the Matlab compiler, you should not have serious problems with it.
Does anyone have experience creating a shared library in MATLAB?