Is there a way to get the mex file for a built-in MATLAB m- file? If yes, how? If no, does that mean I have to write the C code myself (oh nooo!!!)
+1
A:
The Matlab built-in functions are closed-source. Thus, you won't be able to get the code for them. It is possible to call Matlab functions from C code, though, if that solves your problem.
Depending on the function you want, you can find some of it elsewhere. For example, linear algebra operations are in LAPACK, and you may be able to get something from the source of OCTAVE.
Jonas
2010-05-26 01:09:20
How do I call matlab fubctions from C. I thought the whole point of 'mexing' was to not have to run m files.
hkf
2010-05-26 16:48:16
If you're writing a program in C and you need some Matlab functionality that you don't want to reverse engineer, you can call the Matlab function (http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/f29148.html). This is not going to help you, since you seem to want to write a program in Matlab and speed up parts of it by reimplementing in C++.
Jonas
2010-05-26 20:57:01