engEvalString (Fortran) - Evaluate expression in string - MATLAB (original) (raw)
Main Content
Evaluate expression in string
Fortran Syntax
#include "engine.h" integer4 engEvalString(ep, string) mwPointer ep character(*) string
Description
engEvalString
evaluates the expression contained instring
for the MATLAB® engine session, ep
, previously started byengOpen
.
UNIX Operating Systems
On UNIX® systems, engEvalString
sends commands to the MATLAB workspace by writing down a pipe connected to the MATLAB_stdin
_ process. MATLAB reads back from stdout
any output resulting from the command that ordinarily appears on the screen, into the buffer defined byengOutputBuffer
.
To turn off output buffering in Fortran, use:
Microsoft Windows Operating Systems
On a Windows® system, engEvalString
communicates with MATLAB using a Component Object Model (COM) interface.
Input Arguments
Pointer to engine, specified as mwPointer
.
Expression to evaluate, specified as character*(*)
.
Output Arguments
Status, returned as integer*4
. The function returns1
if the engine session is no longer running or the engine pointer is invalid or NULL
. Otherwise, returns 0
even if the MATLAB engine session cannot evaluate the command.
Examples
To open an example, type:
edit([fullfile(matlabroot,"extern","examples","engmat","filename")]);
where filename
is:
- fengdemo.F for a Fortran example.
Version History
Introduced before R2006a