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.

Calling a Matlab function from within Comsol

Please login with a confirmed email address before reporting spam

I would like to call a Matlab function from within Comsol, and run across the error:

Failed to load library.
- Error: dlopen(/Applications/COMSOL41/lib/maci64/flmatlab.dylib, 5): Library not loaded: @loader_path/libeng.dylib
Referenced from: /Applications/COMSOL41/lib/maci64/flmatlab.dylib
Reason: image not found

I have the library on my computer (a Mac) in /Applications/MATLAB_R2011b.app/bin/maci64/libeng.dylib , but do not know how to check or set @loader_path.

As a simple example of how to get this error is to write a Matlab function:

function output=disp(x)
output=x;

and insert it into Comsol as a displacement boundary condition.

Any ideas?

Teresa

2 Replies Last Post Jul 26, 2017, 2:46 a.m. EDT
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 3, 2012, 11:08 a.m. EDT
Hi

have you checed the KB of comsol ? (knowlwdge base) there are a few suggestions therein, I had to (re) register my matlab to call a matlab function but that was in windows W7-64

--
Good luck
Ivar
Hi have you checed the KB of comsol ? (knowlwdge base) there are a few suggestions therein, I had to (re) register my matlab to call a matlab function but that was in windows W7-64 -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Jul 26, 2017, 2:46 a.m. EDT
Updated: 7 years ago Jul 26, 2017, 2:49 a.m. EDT
Have you solved your problem?I got the same problem and felt anxious with it for days.
Have you solved your problem?I got the same problem and felt anxious with it for days.

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.