problem while running a comsol mesh file,which is saved in comsol software as M-file

조회 수: 12 (최근 30일)
MODEM
MODEM 2012년 5월 26일
답변: Takafumi 2022년 9월 6일
Dear sir, I am getting error while running a comsol modeled file. Comsol has the option to save a model as M-file. While i am try to run the model in matlab (drag and drop it in control window) i am getting the error:
run('D:\Users\sudhakar\Desktop\New folder\a.m') ??? Undefined variable "ModelUtil" or class "ModelUtil.create".
Error in ==> a at 10 model = ModelUtil.create('Model');
Error in ==> run at 57 evalin('caller', [s ';']);
??? Undefined variable "ModelUtil" or class "ModelUtil.create".
Error in ==> a at 10 model = ModelUtil.create('a');
Pls help me in this perspective

답변 (2개)

Walter Roberson
Walter Roberson 2012년 5월 26일

Takafumi
Takafumi 2022년 9월 6일
Add following two lines at the begining of the script.
>> import com.comsol.model.*
>> import com.comsol.model.util.*

카테고리

Help CenterFile Exchange에서 Instrument Control Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by