The ability to force a subfunction to be inlined in the generated code is not available in Real-Time Workshop Embedded Coder 5.0 (R2007b) and prior versions of Real-Time Workshop Embedded Coder.
In Real-Time Workshop Embedded Coder 5.1 (R2008a), there is an option "eml.inline('always')" which forces inlining of the current function in generated code. In order to inline a function in the generated code, insert the following code inside the function.
Additional information on this option can be found at the following link:
<http://www.mathworks.com/access/helpdesk/help/toolbox/eml/ug/eml.inline.html>
Best Answer