Main Content

engPutVariable (Fortran)

Put variable intoMATLABengine workspace

Fortran Syntax

#include "engine.h" integer*4 engPutVariable(ep, name, pm) mwPointer ep, pm character*(*) name

Description

engPutVariablewritesmxArraypmto the engineep, giving it the variable namename.

If themxArraydoes not exist in the workspace, the function creates it. If anmxArraywith the same name exists in the workspace, the function replaces the existingmxArraywith 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 thewhichfunction.

The engine application owns the originalmxArrayand is responsible for freeing its memory. Although theengPutVariablefunction sends a copy of themxArrayto the MATLAB workspace, the engine application does not need to account for or free memory for the copy.

Input Arguments

expand all

Pointer to engine, specified asmwPointer.

Name ofmxArrayin the MATLAB workspace, specified ascharacter*(*).

Version History

Introduced before R2006a

See Also