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.

Correct syntax for creating domain selection in the JAVA Api?

Please login with a confirmed email address before reporting spam

I am trying to follow the busbar tutorial using Comsol + Matlab.

To create a variable representing multiple boundaries to avoid redundancy the following code is given:

<code>
sel1 = model.selection.create('sel1');
sel1.set([2 3 4 5 6 7]);
sel1.name('Ti bolts');
</code>

Matlab returns the following error:

Error using busbar (line 54)
Java exception occurred:
Exception:
java.lang.IllegalArgumentException: Illegal input vector
(rethrown as com.comsol.util.exceptions.FlException)
Messages:
Illegal input vector

Line 54 refers to the second line of code.
Any one knows what the issue may be with the syntax if that's the problem?

Thank you,
Kayode

0 Replies Last Post 2014年4月17日 GMT-4 00:39
COMSOL Moderator

Hello Kayode Nwanze

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.