coder.MATLABCodeTemplate.setTokenValue
クラス: coder.MATLABCodeTemplate
名前空間: coder
コード生成テンプレートに対するトークンの値の設定
構文
setTokenValue(tokenName,tokenValue)
説明
setTokenValue(
は、コード生成テンプレートに対してトークンの値を設定します。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