Adding a MATLAB
®
Function with the COMSOL
®
API Syntax
To add a MATLAB
®
feature node to the COMSOL Multiphysics
model using the COMSOL API, enter the command:
model.func.create(
<ftag>
, 'MATLAB')
Define the function name and function arguments with the command:
model.func(
<ftag>
).setIndex('funcs',
<function_name>
, 0, 0)
model.func(
<ftag>
).setIndex('funcs',
<arglist>
, 0, 1)
where
<function_name>
is a string set with the function name and
<arglist>
is a string that defines the list of the input arguments.