I read in the comment that this is a great source to learn S-function level-2. ( I want to convert my level-1 S-function to level-2), so I hope this could be a great start.
May I ask, where can I find this file ?
The September 2004 MATLAB Digest contains an article called "Incorporating M-code into Simulink models" by Fred Smith and Jason Ghidella
It is no longer available in the link you provided.
Thank you very much in advance.