MATLAB: MexPrintf no longer works in r2014a

mexprintfr2014asimulink

mexPrintf() seems to have stopped working entirely in r2014a?
I have several fully-inlined C MEX S functions, which need to open up work vectors for signal buffers. To keep an eye on them, I have code in the .c file which ways something like:
mexPrintf("Initialised a buffer of %d samples.\n", *MaxDelaySamples+1);
I always used to see a stream of these messages pop up in my command window when running a model, or when creating new RTW code from the model code.
Under r2014a, however, the messages don't appear at all? I didn't change anything in my code which should affect this, so far as I am aware. Any ideas?

Best Answer

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.
Related Question