I have some MEX code that calls functions from a DLL. The DLL has a bunch of printf statements scattered around that are useful for debugging. However, I cannot see their output in the MATLAB command window. I've done some reading and apparently this is because the command windows is not treated as a console application where the output from printf can be sent. I have tried using this I have some MEX code that calls functions from