getmcruserdata
检索MATLABarray value associated with a given key
Syntax
Description
returns MATLAB®data associated with the stringvalue
= getmcruserdata(key
)key
in the currentMATLAB Runtimeinstance. If there is no data associated with the key, it returns an empty matrix.
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
Get the magic square data associated with the string'magic'
in the current instance of theMATLAB Runtime.
value = magic(3); setmcruserdata('magic', value); getmcruserdata('magic')
ans = 8 1 6 3 5 7 4 9 2