views:

72

answers:

1
+1  Q: 

MATLAB Mex files

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
How do I call matlab fubctions from C. I thought the whole point of 'mexing' was to not have to run m files.
hkf
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

related questions