Another advantage of using LiveLink™ for MATLAB® is the ability to call a MATLAB
® function directly from within the COMSOL Desktop
®. You can use a function to define, within a COMSOL
® model object, properties such as material definitions or physics settings. COMSOL Multiphysics automatically detects the external function and starts the MATLAB engine to evaluate it. The function output is then applied to the corresponding property.
Note: On Linux® operating systems, specify the MATLAB root directory
MLROOT and load the gcc library when you start the COMSOL Desktop:
comsol -mlroot MLROOT -forcegcc. On some Linux systems you may need to replace the argument
-forcegcc with
-forcecomsolgcc.