getmcruserdata - Retrieve MATLAB array value associated with a given
Main Content
Retrieve MATLAB array value associated with a given key
Syntax
Description
[value](#mw%5F0902816a-2b6f-4d24-9d0b-22a0c8bd7db8) = getmcruserdata([key](#mw%5F7044dd93-97cc-4ed2-b1d1-a65cb0adb18c))
returns MATLAB® data associated with the stringkey
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')
Input Arguments
key
is the MATLAB string with which MATLAB data value
is associated within the current instance of theMATLAB Runtime.
Output Arguments
value
is the MATLAB data associated with input string key
for the current instance of the MATLAB Runtime.
Version History
Introduced in R2008b