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.

Connect comsol with Matlab and modify the m-file, problems about eigenfrequency analysis.

Please login with a confirmed email address before reporting spam

Hi all,

I am learning to work comsol with matlab. The principle is simple, to vary the geometry in comsol and collect the different eigenfrequencies due to the variation.

I tried to open the m-file in matlab and running it, before making any change, and I got the following error messages:



Undefined function or method 'flgetvector' for input arguments of type 'double'.

Error in ==> flexch at 11
vao = flgetvector(exch.getSize(ind), exch.getAdr(ind));

Error in ==> femmesh.subsref at 29
pCell{i} = flexch('flgetvector',pExch,i-1);

Error in ==> geomplot2 at 61
p=m.p;

Error in ==> geomplot at 224
hh=geomplot2(g,prop);

Error in ==> postgeomplot at 47
h = geomplot(geomObject{i},...

Error in ==> postplot at 719
h = postgeomplot(geomObjects,sDim,geomcolor,ax,linewidth);

Error in ==> test at 183
postplot(fem, ...



I am wondering since the m-file was completely generated by comsol, it should have no problem to run in matlab, is it right?

Another question is I tried to modify the geometry in matlab and created a for() loop, but I didnt know how to collect the different eigenfrequencies from every round. Since I didnt see any variables in the m-file related to the eigenfrequency.


Your kind answer would be a big help for my comsol-learning.

0 Replies Last Post 10 set 2010, 04:25 GMT-4
COMSOL Moderator

Hello Cheng Yang

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.