Setting the Function Directory Path in MATLAB
®
To be able to run a model that use an external MATLAB
®
function, the path directory of the function has to be set in MATLAB before it is called by COMSOL Multiphysics
to evaluate the function.
To proceed you have these options to set the directory path in MATLAB:
•
the model MPH-file in the same directory as for the M-functions;
•
Set the system environment variable COMSOL_MATLAB_PATH with the M-functions directory path; or
•
Use the
Set Path
window to specify the MATLAB search path. To open the window type
pathtool
at the MATLAB prompt or in the MATLAB desktop go the
Home
toolbar,
Environment
group.