This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

User Messages

To print text in the MATLAB® Command Window, use the mexPrintf function as you would a C/C++ printf function. To print error and warning information in the Command Window, use the mexErrMsgIdAndTxt and mexWarnMsgIdAndTxt functions.

For example, the following code snippet prints prhs[0].

char *buf;
int buflen;

if (mxGetString(prhs[0], buf, buflen) == 0) {
    mexPrintf("The input string is:  %s\n", buf);

See Also

| |

Was this topic helpful?