Specify buffer for MATLAB output
engOutputBuffer defines a character buffer for engEvalString to return any output that ordinarily appears on the screen.
The default behavior of engEvalString is to discard any standard output caused by the command it is executing. A call to engOutputBuffer with a buffer of nonzero length tells any subsequent calls to engEvalString to save output in the character buffer pointed to by p.
To turn off output buffering in C, use:
engOutputBuffer(ep, NULL, 0);
To turn off output buffering in Fortran, use:
See the following examples in matlabroot/extern/examples/eng_mat.