Simulink 6 has introduced additional methods for incorporating M-code into Simulink models. Learn about the different methods of using M-code when modeling dynamic systems for simulation and code generation and how to choose the appropriate approach for your application.
The September 2004 MATLAB Digest contains an article called "Incorporating M-code into Simulink models" by Fred Smith and Jason Ghidella
* Unzip the files into a new directory
* run the m-file "runme.m", this will open up a HTML document describing the different models.
* Step through the different models to compare the implementations.
*If you have the Simulink Accelerator, you can also run profile reports to see the time taken by each block, once the simulation is completed.