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.

getmcruserdata

Retrieve MATLAB array value associated with a given key

Syntax

value = getmcruserdata(key)

Description

value = getmcruserdata(key) returns MATLAB® data associated with the string key in the current MATLAB Runtime instance. If there is no data associated with the key, it returns an empty matrix.

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

Get the magic square data associated with the string 'magic' in the current instance of the MATLAB Runtime.

value = magic(3);
setmcruserdata('magic', value);
getmcruserdata('magic')
ans =
     8     1     6
     3     5     7
     4     9     2

Input Arguments

collapse all

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

Output Arguments

collapse all

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

Introduced in R2008b