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.

Successful In Comsol, Failed In Matlab: Illegal Input Vector Illegal Entity Number

Please login with a confirmed email address before reporting spam

The below post is related to an archived discussion


Hello everyone, I built my model in comsol 5.4 and succeed in getting a solvement. Exporting the same model to matlab, I got the following error:

Java exception occurred: Exception:

com.comsol.util.exceptions.UnexpectedServerException: java.lang.IllegalArgumentException: Illegal input vector illegal entity number (rethrown as com.comsol.util.exceptions.FlException)

Messages:

java.lang.IllegalArgumentException: Illegal input vector illegal entity number

Stack trace:

at com.comsol.model.selections.SelectionMethod.a(SourceFile:1280)

at com.comsol.model.selections.SelectionMethod.set(SourceFile:853)

at com.comsol.model.data.primitive.SelectionPrim.set(SourceFile:339)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at com.comsol.bridge.command.b.a(SourceFile:145)

at com.comsol.bridge.command.b.run(SourceFile:90)

at com.comsol.bridge.command.i.execute(SourceFile:45)

at com.comsol.bridge.command.j.d(SourceFile:711)

at com.comsol.bridge.command.j.a(SourceFile:699)

at com.comsol.bridge.command.j$3.a(SourceFile:600)

at com.comsol.bridge.command.j$3.call(SourceFile:1)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)

The correesponding line is to set PML:

427 model.component('comp1').coordSystem.create('pml1', 'PML'); 428 model.component('comp1').coordSystem('pml1').selection.set([1 4]); 429 model.component('comp1').coordSystem('pml1').set('wavelengthSourceType', 'userDefined'); 430 model.component('comp1').coordSystem('pml1').set('typicalWavelength', 'lam');

The error occurs at line 428. Please help me with this problem, thanks!


0 Replies Last Post 2021年8月1日 GMT-4 04:49
COMSOL Moderator

Hello 沐 蒋

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.