Main Content

coder.MATLABCodeTemplate.setTokenValue

クラス: coder.MATLABCodeTemplate
名前空間: coder

コード生成テンプレートに対するトークンの値の設定

構文

setTokenValue(tokenName,tokenValue)

説明

setTokenValue(tokenName,tokenValue) は、コード生成テンプレートに対してトークンの値を設定します。

入力引数

tokenName

トークンの名前

tokenValue

トークンの値

既定値:

カスタム テンプレートから MATLABCodeTemplate オブジェクトを作成します。テンプレートでカスタム トークンの値を設定します。

newObj = coder.MATLABCodeTemplate('myCGTFile');
% Create a MATLABCodeTemplate object from a custom template file
newObj.setTokenValue('myCustomToken', 'myValue');
% Set the value of a custom token in the file
newObj.getTokenValue('myCustomToken')
% Check value of the custom token