engPutVariable (Fortran)
Put variable intoMATLABengine workspace
Fortran Syntax
#include "engine.h" integer*4 engPutVariable(ep, name, pm) mwPointer ep, pm character*(*) name
Description
engPutVariable
writesmxArray
pm
to the engineep
, giving it the variable namename
.
If themxArray
does not exist in the workspace, the function creates it. If anmxArray
with the same name exists in the workspace, the function replaces the existingmxArray
with the newmxArray
.
数据传输的大小的限制red is 2 GB.
Do not use MATLAB®function names for variable names. Common variable names that conflict with function names includei
,j
,mode
,char
,size
, orpath
. To determine whether a particular name is associated with a MATLAB function, use thewhich
function.
The engine application owns the originalmxArray
and is responsible for freeing its memory. Although theengPutVariable
function sends a copy of themxArray
to the MATLAB workspace, the engine application does not need to account for or free memory for the copy.