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 functions in comsol

Pavan Kumar Penumakala

Please login with a confirmed email address before reporting spam

Hello...

I defined a MATLAB function in global definitions with argument T
i created function.m file in matlab and saved both .mph and .m file in the same folder..
and i set the matlab path to point the same folder..

when i am trying to execute ..gives the error ' Function is not found'..

Is there any steps i am missing..

i follwed in comsol 4.1.. 1.define MATLAB function and arguments in comsol
2. create .m file in matlab
3. set the matalb working path to the folder where .mph and .m files are saved.

can any one suggest how to make comsol to find the matlab function..

thanks
pavan

5 Replies Last Post 11 giu 2012, 09:54 GMT-4
COMSOL Moderator

Hello Pavan Kumar Penumakala

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.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 7 giu 2012, 16:20 GMT-4
True. I have the very same problem. Apparently, everything is following the Livelink Guide, still doesn't work.
True. I have the very same problem. Apparently, everything is following the Livelink Guide, still doesn't work.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 9 giu 2012, 14:03 GMT-4

Did you connect to the Server ?


\Flanell
Did you connect to the Server ? \Flanell

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 9 giu 2012, 20:44 GMT-4
Sure, I did!
Sure, I did!

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 10 giu 2012, 08:01 GMT-4
Do you get the Comsol error "Function not found.." or "MATLAB function not found.."

The first could also mean that your Matlab function is already known to Comsol but you somehow incorrectly call it. (e.g. no argument)

The latter really indicates that your function is not known to Comsol and its a path issue. (filename=function name ?)


You also have to take care of that Comsol doesnt update your Matlab function if you change your m.file. That kept me busy for a day. check this thread: www.comsol.de/community/forums/general/thread/7946/


\Flanell
Do you get the Comsol error "Function not found.." or "MATLAB function not found.." The first could also mean that your Matlab function is already known to Comsol but you somehow incorrectly call it. (e.g. no argument) The latter really indicates that your function is not known to Comsol and its a path issue. (filename=function name ?) You also have to take care of that Comsol doesnt update your Matlab function if you change your m.file. That kept me busy for a day. check this thread: http://www.comsol.de/community/forums/general/thread/7946/ \Flanell

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11 giu 2012, 09:54 GMT-4
Thanks. This thread is a good one. I'll try that. I guess the problem is that I have more than one version of MATLAB, both 32 bits and 64 bits, or something similar to this. I also see both R2010b, and R2011b in the installed folder of MATlAB.
Thanks. This thread is a good one. I'll try that. I guess the problem is that I have more than one version of MATLAB, both 32 bits and 64 bits, or something similar to this. I also see both R2010b, and R2011b in the installed folder of MATlAB.

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.