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.

Using matlab and comsol variables in a matlab function

Please login with a confirmed email address before reporting spam

Hi,

I'm using scripts in matlab (with the matlab LiveLink) and I would like to define functions that use both comsol variables (such as the position x) and variables that have been calculated in matlab (say the wave vector kx and the corresponding Fourier component of the electric field Ekx). My goal is to set the electric field E(x) by a function Ex=fun(kx, Ekx, x), fun being the inverse Fourier transform.

As far as I've understood, it is possible to define function using either comsol variables or matlab variables but not both (at least I have not succeeded). Could someone help me?

Best regards,

Guillaume.

0 Replies Last Post Mar 14, 2012, 4:30 p.m. EDT
COMSOL Moderator

Hello Guillaume Bachelier

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.