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.

Can COMSOL accept vector valued inputs from MATLAB functions?

Please login with a confirmed email address before reporting spam

Hello,

Here, I have a function [Y1;Y2;Y3] = f(X1,X2,X3) which is defined in matlab.

In COMSOL v3.5a, I have to assign Y1, Y2, Y3 seperately as follow:
Y1 = f(X1,X2,X3)
Y2 = f(X1,X2,X3)
Y3 = f(X1,X2,X3)

I am wondering if I can directly assign the vector output of matlab to COMSOL variables in the new version.

Thanks

Dan

1 Reply Last Post Sep 28, 2012, 12:57 p.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 28, 2012, 12:57 p.m. EDT
I don't think so. What I do in this case is slightly modify Matlab function: YN= f(X1,X2,X3,N) for N=1,2,3. Then you can call it as, for example, Y1= f(X1,X2,X3,1)
I don't think so. What I do in this case is slightly modify Matlab function: YN= f(X1,X2,X3,N) for N=1,2,3. Then you can call it as, for example, Y1= f(X1,X2,X3,1)

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.