MATLAB Application Program Interface Reference | Help Desk |
engPutMatrix
WritemxArrays
into a MATLAB engine's workspace
integer*4 function engPutMatrix(ep, mp) integer*4 mp, ep
ep
mp
This routine allows you to write an mxArray
into a MATLAB engine's workspace.
engPutMatrix
writes mxArray
mp
to the engine ep
. If the mxArray
does not exist in the workspace, it is created. If an mxArray
with the same name already exists in the workspace, the existing mxArray
is replaced with the new mxArray
.
engPutMatrix
returns 0 if successful and 1 if an error occurs.
Be careful in your code to free the mxArray
created by this routine when you are finished with it.
On UNIX systems, engPutMatrix
issues the command load
stdio
name
to MATLAB and sends the data down the stdin pipe.
See fengdemo.f
in the eng_mat
subdirectory of the examples
directory for a sample program that illustrates how to call the MATLAB engine functions from a Fortran program.
Note: Fortran engine routines are not available on Windows.