|
MATLAB Coder is a tool for converting m-code to c or c++.
Since much of MATLAB's functionality (e.g. anything relying on java or COM, but other things too) cannot be converted to c, any m-code that uses that functionality will not work with MATLAB Coder.
Hence MATLAB Coder only supports a subset of the MATLAB language.
The main difference between MATLAB Coder and a MATLAB Fcn block in Simulink is the interface to the code -- one runs in MATLAB the other in Simuink.
Prior to R2012a they used different editors, although as of R2012a the MATLAB Fcn block now uses the standard MATLAB Editor.
Lots of examples can be found at:
http://www.mathworks.com/help/toolbox/coder/exampleindex.html
Phil.
|