| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
#include "engine.h" int engOutputBuffer(Engine *ep, char *p, int n);
integer*4 engOutputBuffer(ep, p) mwPointer ep character*n p
1 if you pass it a NULL engine pointer. Otherwise, returns 0.
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:
engOutputBuffer(ep, '')
See engdemo.c in the matlabroot/extern/examples/eng_mat folder for sample programs that illustrate how to call the engine functions from a C program.
See engwindemo.c in the matlabroot/extern/examples/eng_mat folder for sample programs that illustrate how to call the engine functions from a C program for Windows systems.
See fengdemo.F in the matlabroot/extern/examples/eng_mat folder for sample programs that illustrate how to call the engine functions from a Fortran program.
[1] UNIX is a registered trademark of The Open Group in the United States and other countries.
![]() | engOpenSingleUse (C) | engPutVariable (C and Fortran) | ![]() |

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