 <p>Not every MATLAB function can be converted to C code.</p> <p>For a list of supported function see <a href="http://www.mathworks.com/help/simulink/ug/functions-supported-for-code-generation--alphabetical-list.html" rel="nofollow">here</a>.</p> <p>If you wish to use MATLAB functions that are not on the list, you should write your own version in MATLAB (if possible, in your case I doubt it) or in C.</p>