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.

Trouble with Matlab functions

Please login with a confirmed email address before reporting spam

Hello

I'm working with the LiveLink to Matlab and Comsol 4.4. Now it seems that either there are some restrictions in this LiveLink or I'm missing something.
First I defined global variables in Matlab, that I call later on in Matlab functions. These Matlab functions are used in the Comsol model. This does not work in Comsol. I read in a discussion that Comsol does have problems with global variables. Is it really not possible to work with them?
Second it seems that Comsol can not read Matlab functions that contain if-else statements. Is that true?
At the moment it seems the only Matlab functions I can call in Comsol are simple polynoms.
Does anybody know the correct approach to call Matlab functions in Comsol or if there are really some restrictions? Is the Matlab environment used by the LiveLink not the usual Matlab environment?

Thank you for taking time and for your help.
Anina

0 Replies Last Post 02.04.2014, 05:30 GMT-4
COMSOL Moderator

Hello Anina Steinlin

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.