In general ssPrintf is recommended over mexPrintf in S-functions, although in normal simulation that runs via the MEX-file, this should just expand to mexPrintf. You can open the Diagnostic Viewer even when there are no errors via the menu on the Simulink Editor Window: View>Diagnostic Viewer. Alternately, you can run the model using the command-line interface with the SIM command to have the output stream redirected to the MATLAB command window.
Best Answer