setmcruserdata

Associate MATLAB data value with string key

Syntax

function setmcruserdata(key, value)

Description

The function setmcruserdata(key, value) command is part of the MATLAB® Runtime User Data interface API.

Examples

In C++:

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

In C:

mxArray *key = mxCreateString("ParallelProfile"); 
mxArray *value = mxCreateString("\usr\userdir\config.settings");
if (!mlfSetmcruserdata(key, value))
{
    fprintf(stderr, 
            "Could not set MCR user data: \n %s ",
            mclGetLastErrorMessage());
    return -1;
}
Was this topic helpful?