Main Content

setmcruserdata

Associate MATLAB data value with a key

Description

void setmcruserdata(key, value) associates the MATLAB® data value with the string key in the current MATLAB Runtime instance. If there is already a value associated with the key, it is overwritten.

This function is part of the MATLAB Runtime User Data interface API. It is available both in MATLAB and in deployed applications created with MATLAB Compiler™ and MATLAB Compiler SDK™.

Examples

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

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

Input Arguments

collapse all

Value is the MATLAB data associated with input string key for the current instance of the MATLAB Runtime.

key is a MATLAB string with which MATLAB data value is associated within the current instance of the MATLAB Runtime.

Version History

Introduced in R2008a