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.

Problem with LiveLink for Matlab mphstate

Please login with a confirmed email address before reporting spam

I´m currently working into LiveLink for Matlab and COMSOL and encountered a problem when trying to extract the system matrices (for model reduction) when applying the "mphstate" command. On the one hand i´m not able to figure out what the "coords2" component for the domain point probe is about, probably leading to an error like:

model.param.set('Qinput','4010.7[W/m^3]'); %% Setting the heat source as parameter comp1 = model.component('comp1'); comp1.physics('ht').feature('hs1').set('Q0',1,'Qinput'); pdom1 = comp1.probe.create('pdom1','DomainPoint'); pdom1.setIndex('coords2','0.4',0,0); pdom1.setIndex('coords2','0.6',0,1); time = model.study('std2').feature('time'); time.set('tlist','range(0,50,2e3)'); M=mphstate(model,'sol2','out',{'A','B','C','D'},... %% Getting the matrices 'input','Qinput','output','comp1.ppb1');

Error using mphstate Java exception occurred: Exception:

com.comsol.util.exceptions.UnexpectedServerException: java.lang.ArrayIndexOutOfBoundsException: 2
(rethrown as com.comsol.util.exceptions.FlException)

Messages:

java.lang.ArrayIndexOutOfBoundsException: 2

Also the tutorials within the manual do not work ... which is quite strange. I guess it´s just a trivial mistake done by me, but i can´t figure out its source. Greetings.

-------------------
Vierl

0 Replies Last Post 2018年10月23日 GMT-4 07:32
COMSOL Moderator

Hello Vierl

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.