| Contents | Index |
#include "mex.h" int mexPrintf(const char *message, ...);
integer*4 mexPrintf(message) character*(*) message
String to display. In C, the string can include conversion specifications, used by the ANSI C printf function.
In C, any arguments used in the message. Each argument must have a corresponding conversion specification.
Number of characters printed including characters specified with backslash codes, such as \n and \b.
This routine prints a string on the screen and in the diary (if the diary is in use). It provides a callback to the standard C printf routine already linked inside MATLAB software, which avoids linking the entire stdio library into your MEX-file.
In a C MEX-file, you must call mexPrintf instead of printf to display a string.
Note If you want the literal % in your message, use %% in the message string since % has special meaning to printf. Failing to do so causes unpredictable results. |
See the following examples in matlabroot/extern/examples/mex.
See the following examples in matlabroot/extern/examples/refbook.
mexErrMsgIdAndTxt, mexErrMsgTxt, mexWarnMsgIdAndTxt, mexWarnMsgTxt

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |