Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

"Matlab function is not found" error in MATLAB livelink

Please login with a confirmed email address before reporting spam

I am using MATLAB livelink for a heat transfer problem. I am trying to define a function for density of the material used in my model. I use the following commands in MATLAB to make the function. I should also mention that Density.m file is also in the directory in which the main MATLAB file is.


extm1=model.func.create('extm1', 'MATLAB');


Density=extm1.setIndex('funcs', 'Density', 0, 0);

extm1.setIndex('funcs', 'T', 0, 1);

mat1.propertyGroup('def').set('density', {'Density(T)[kg/m^3]'});


As soon as I execute (std1.run) a “MATLAB command window” shows up and the code execution breaks due to the following error.

Matlab function is not found: Density
- Function: Density
- Feature: Time-Dependent Solver 1 (sol1/t1)
- Error: Matlab function is not found: Density


I greatly appreciate it if you help me with this problem.

0 Replies Last Post 2014年3月11日 GMT-4 21:52
COMSOL Moderator

Hello Iman Ghamarian

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.