External Interfaces/API Reference Previous page   Next Page
mexPrintf

ANSI C printf-style output routine

C Syntax

Arguments

format, ...
   ANSI C printf-style format string and optional arguments.

Returns

The number of characters printed. This includes characters specified with backslash codes, such as \n and \b.

Description

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, and avoids linking the entire stdio library into your MEX-file.

In a MEX-file, you must call mexPrintf instead of printf.

Examples

See mexfunction.c in the mex subdirectory of the examples directory. For an additional example, see phonebook.c in the refbook subdirectory of the examples directory.

See Also

mexErrMsgTxt, mexWarnMsgTxt


Previous page  mexMakeMemoryPersistent mexPutArray (Obsolete) Next page

Learn more about the latest releases of MathWorks products:

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS