MATLAB Application Program Interface
  Go to function:
    Search    Help Desk 
engPutMatrix    Examples

Write mxArrays into a MATLAB engine's workspace

Fortran Syntax

Arguments

ep
  Engine pointer.

mp
  mxArray pointer.

Description

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.

Example

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.



[ Previous | Help Desk | Next ]