Main Content

setMacro

Class: coder.make.ToolchainInfo
Namespace: coder.make

Set value of macro

Syntax

h.setMacro(macroname, value)

Description

h.setMacro(macroname, value) sets the value of a macro.

Input Arguments

expand all

A coder.make.ToolchainInfo object, specified using an object handle, such as h. To create h, enter h = coder.make.ToolchainInfo in a MATLAB® Command Window.

Name of macro.

Value of the macro, specified as a character vector, string scalar, or cell array.

If the value contains MATLAB functions or other macros, ToolchainInfo interprets the value of functions and macros.

Data Types: cell | char | string

Examples

h.setMacro('CYGWIN','C:\cygwin\');
h.getMacro('CYGWIN')
ans  = 

C:\cygwin\bin\

h.removeMacro('CYGWIN')

Version History

Introduced in R2013a