Skip to Main Content Skip to Search
Product Documentation

setmcruserdata - Associate MATLAB data value with string key

Syntax

function setmcruserdata(key, value)

Description

The function setmcruserdata(key, value) command is part of the MCR User Data interface API. For information about this function, as well as complete examples of usage, see Improving Data Access Using the MCR User Data Interface.

The MATLAB functions getmcruserdata and setmcruserdata can be dragged and dropped (as you would any other MATLAB file), directly to the deploytool GUI.

Examples

setmcruserdata('ParallelConfigurationFile','config.mat')
mxArray *value = mxCreateString("/usr/userdir/config.mat");
if (!SetMCRUserData("ParallelConfigurationFile", 
      "/usr/userdir/config.mat") )
{
    fprintf(stderr, 
            "Could not set MCR user data: \n %s ",
            mclGetLastErrorMessage());
    return -1;}

See Also

getmcruserdata

  


Free MATLAB Compiler Interactive Kit

Learn how to build standalone executables and C/C++ shared libraries from MATLAB code.


Get free kit

Trials Available

Try the latest version of MATLAB Compiler.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS