Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

setmcruserdata

Associate MATLAB data value with a key

Syntax

void setmcruserdata(key, value)

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.

Introduced in R2008a