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 2017年7月26日 GMT-4 02:46
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 2012年4月3日 GMT-4 11:08
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 2017年7月26日 GMT-4 02:46
Updated: 7 years ago 2017年7月26日 GMT-4 02:49
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.