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.

Livelink for Matlab Error

Please login with a confirmed email address before reporting spam

Can somebody please shed some light on this error?
Firstly model is exported from COMSOL (both 4.4 and 5) as .m file.
The I start matlab using the command: comsol mphserver matlab
and try to run the .m file exported from comsol getting the error below.


Error using model_name (line 402)
Java exception occurred:
Exception:
com.comsol.util.exceptions.FlException: Failed to evaluate expression
(rethrown as com.comsol.util.exceptions.FlException)
(rethrown as com.comsol.util.exceptions.FlException)
Messages:
Failed to evaluate expression

Failed to evaluate expression

Cannot evaluate expression.

Undefined variable.
- Variable: beam.disp
- Geometry: geom1
- Edges: 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, ...

Failed to evaluate expression.
- Expression: beam.disp
- Plot: line1 (Line)

Stack trace:
at com.comsol.clientapi.engine.c.handleException(Unknown Source)
at com.comsol.client.interfaces.f$d.f(Unknown Source)
at com.comsol.client.interfaces.f.a(Unknown Source)
at com.comsol.client.interfaces.f.runAndWait(Unknown Source)
at com.comsol.clientapi.engine.APIEngine.runMethod(Unknown Source)
at com.comsol.clientapi.engine.APIEngine.runMethod(Unknown Source)
at com.comsol.clientapi.impl.ResultFeatureClient.run(Unknown Source)
Caused by: Exception:
com.comsol.util.exceptions.FlException: Failed to evaluate expression
(rethrown as com.comsol.util.exceptions.FlException)
Messages:
Failed to evaluate expression

Cannot evaluate expression.

Undefined variable.
- Variable: beam.disp
- Geometry: geom1
- Edges: 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, ...

Failed to evaluate expression.
- Expression: beam.disp
- Plot: line1 (Line)

at com.comsol.clientapi.engine.c.handleException(Unknown Source)
at com.comsol.client.interfaces.f.a(Unknown Source)
at com.comsol.client.interfaces.f.processCommandAnswer(Unknown Source)
... 6 more
Caused by: Exception:
com.comsol.util.exceptions.FlException: Failed to evaluate expression
Messages:
Cannot evaluate expression.

Undefined variable.
- Variable: beam.disp
- Geometry: geom1
- Edges: 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, ...

Failed to evaluate expression.
- Expression: beam.disp
- Plot: line1 (Line)

at evaltree.cpp. Row: 708(Detail: :2)
at xevaluators.cpp. Row: 373(Detail: :1)
at xmodel_post.cpp. Row: 704(Detail: :0)
at com.comsol.nativejni.xmesh.Xmesh.postEval(Native Method)
at com.comsol.nativejni.xmesh.Xmesh.postEval(Unknown Source)
at com.comsol.nativemph.xmesh.Xmesh.a(Unknown Source)
at com.comsol.post.dataset.u.a(Unknown Source)
at com.comsol.post.dataset.af.a(Unknown Source)
at com.comsol.post.dataset.ab.a(Unknown Source)
at com.comsol.post.dataset.aa.a(Unknown Source)
at com.comsol.post.plot.l.a(Unknown Source)
at com.comsol.post.plot.ac.h_(Unknown Source)
at com.comsol.post.plot.ac.getPostData(Unknown Source)
at com.comsol.post.plot.ac.getRenderData(Unknown Source)
at com.comsol.model.method.ResultFeatureMethod.getRenderPostDataServer(Unknown
Source)
at com.comsol.model.method.ResultFeatureMethod.getRenderPostData(Unknown Source)
at com.comsol.model.internal.impl.ResultFeatureImpl.T(Unknown Source)
at com.comsol.model.internal.impl.ResultFeatureImpl.getRenderPostData(Unknown
Source)
at com.comsol.model.method.ResultFeatureMethod.getGroupRenderPostDataServer(Unknown
Source)
at com.comsol.model.method.ResultFeatureMethod.getGroupRenderPostData(Unknown
Source)
at com.comsol.model.internal.impl.ResultFeatureImpl.y(Unknown Source) at
com.comsol.model.internal.impl.ResultFeatureImpl.getGroupRenderPostData(Unknown
Source)
at com.comsol.model.method.ResultFeatureMethod.run(Unknown Source)
at com.comsol.model.internal.impl.ResultFeatureImpl.q(Unknown Source)
at com.comsol.model.internal.impl.ResultFeatureImpl.run(Unknown Source)
at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.comsol.bridge.command.b.a(Unknown Source)
at com.comsol.bridge.command.b.b(Unknown Source)
at com.comsol.bridge.command.h.d(Unknown Source)
at com.comsol.bridge.command.i.d(Unknown Source)
at com.comsol.bridge.command.i.a(Unknown Source)
at com.comsol.bridge.command.i$2.a(Unknown Source)
at com.comsol.bridge.command.i$2.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

0 Replies Last Post 2015年3月3日 GMT-5 07:30
COMSOL Moderator

Hello MrD

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.