Main Content

setmcruserdata

AssociateMATLAB数据值的关键

Description

void setmcruserdata(key,value)associates the MATLAB®datavaluewith the stringkeyin the currentMATLAB Runtimeinstance. If there is already avalueassociated with thekey, it is overwritten.

This function is part of theMATLAB RuntimeUser Data interface API. It is available both in MATLAB and in deployed applications created withMATLAB Compiler™andMATLAB Compiler SDK™.

Examples

Store a cell array and associate it with the string'PI_Data'in the current instance of theMATLAB Runtime.

value = {3.14159,'March 14th is PI day'};setmcruserdata('PI_Data', value);

Input Arguments

collapse all

Valueis the MATLAB data associated with input stringkeyfor the current instance of theMATLAB Runtime.

keyis a MATLAB string with which MATLAB datavalueis associated within the current instance of theMATLAB Runtime.

Version History

Introduced in R2008a

See Also