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.

Getting a matlab function to work within Comsol pde?

Please login with a confirmed email address before reporting spam

Hi,

I have 1D general form PDE (g) with dependent variable u. Gamma(the flux term) is defined as an input function - [K]=function(u) from Matlab. This function is a numerical code we wrote that has u as input and (double) K as output. When I define function(u) in Comsol and plot it, it generates the correct plot, meaning my Matlab file path is correct, and Comsol can connect to it and find the right function. When I put function(u) as Gamma term the solution does not seem to be using the function at all.

Any ideas on what I might be doing wrong? What is the correct way of inserting a matlab function into comsol?

Thanks.

0 Replies Last Post 12.05.2010, 16:51 GMT-4
COMSOL Moderator

Hello Fevzi Kivanc

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.