Main Content

getFunctionDefault

Get default function customization template or memory section for model functions category

Since R2021a

    Description

    example

    propertyValue = getFunctionDefault(myCoderDictionaryObj,category,property) returns the value of the specified property for the specified function category.

    Examples

    collapse all

    Use the coder.mapping.api.get function to access the CoderDictionary object associated with the data dictionary.

    cm = coder.mapping.api.get('codeDefinitions.sldd');

    To see the memory section for Execution functions in the dictionary, use the getFunctionDefault function.

    value = getFunctionDefault(cm, 'Execution', 'MemorySection')
    value =
    
        'None'

    To configure the memory section for the category, use the setFunctionDefault function.

    setFunctionDefault(cm, 'Execution', 'MemorySection', 'functionFastMem')

    To verify that the memory section for the Execution category is now set to functionFastMem, use the getFunctionDefault function.

    value = getFunctionDefault(cm, 'Execution', 'MemorySection')
    value =
    
        'functionFastMem'

    Input Arguments

    collapse all

    Coder dictionary object returned by a call to function coder.mapping.api.get.

    Category of model entry-point functions for which to set the function customization template and memory section.

    Example: 'Execution'

    FunctionCustomizationTemplate or MemorySection for which to return a value.

    Example: 'FunctionCustomizationTemplate'

    Output Arguments

    collapse all

    Name of the function customization template or memory section.

    Data Types: char | string

    Version History

    Introduced in R2021a