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

Please login with a confirmed email address before reporting spam

Hi all

I have a matlab function that calculates the magnetic scalar potential of a device as a function of x,y,z and time. I want to use this inside a comsol model(3.3) using Comsol with Matlab. It starts up ok but always returns zeros, or at least the comsol model result is consistent with zeros. I do not know if it calls it!

Is there anything special you need to do to be able to access MATLAB functions from a COMSOL model? I thought it would just work as is.

I am calling the function from the init tab of the subdomain settings.

Thanks in advance for your patience and any help you may offer.

Will

1 Reply Last Post Oct 27, 2009, 4:30 p.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 27, 2009, 4:30 p.m. EDT
Short update:

I managed to get it to call a matlab function in the model directory, but it only allows one input. As I need a function of x,y,z,t I am still in trouble. and I think I must bemissing something obvious to the comsol wizards out there.

Will
Short update: I managed to get it to call a matlab function in the model directory, but it only allows one input. As I need a function of x,y,z,t I am still in trouble. and I think I must bemissing something obvious to the comsol wizards out there. Will

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.