Main Content

coder.MATLABCodeTemplate.getTokenValue

Class: coder.MATLABCodeTemplate
Namespace: coder

Get value of token

Syntax

tokenValue = getTokenValue(tokenName)

Description

tokenValue = getTokenValue(tokenName) returns the value of the specified token.

Input Arguments

tokenName

Name of token

Default: empty

Output Arguments

expand all

The current value of tokenName, returned as a character vector.

Examples

Create a MATLABCodeTemplate object with the default template, then get the value for a token.

newObj = coder.MATLABCodeTemplate;
% Creates a MATLABCodeTemplate object from the default template
newObj.getCurrentTokens()
% Get list of current tokens
newObj.getTokenValue('MATLABCoderVersion')
% Check value of a token