Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Error with command mphgeom(x,y)

Please login with a confirmed email address before reporting spam

Hello,

Using Matlab R2010a, I tryed to plot an imported, yet simple, Bézier polygone or serie of points, without sucess.
Matlab is returning fatal error. The difficulties might be due to a non-solid geometry.

Someone already experienced ?



Try the following: simply four points. You should have to change model path.
_____________________________
function out = model
import com.comsol.model.*
import com.comsol.model.util.*
model = ModelUtil.create('Model');
model.modelPath('C:\Users\carg0029\Desktop');
model.modelNode.create('mod1');
model.geom.create('geom1', 3);
model.mesh.create('mesh1', 'geom1');
model.geom('geom1').run;
model.mesh.remove('mesh1');
model.geom('geom1').feature.create('pt1', 'Point');
model.geom('geom1').runAll;
model.geom('geom1').run('pt1');
model.geom('geom1').feature.create('pt2', 'Point');
model.geom('geom1').feature('pt2').setIndex('p', '1', 0);
model.geom('geom1').run('pt2');
model.geom('geom1').feature.create('pt3', 'Point');
model.geom('geom1').feature('pt3').setIndex('p', '1', 1);
model.geom('geom1').feature('pt3').setIndex('p', '1', 0);
model.geom('geom1').run('pt3');
model.geom('geom1').feature.create('pt4', 'Point');
model.geom('geom1').feature('pt4').setIndex('p', '1', 1);
model.geom('geom1').runAll;
model.geom('geom1').run('pt4');
mphgeom(model,'geom1')
out = model;
----------------------------------------------------------------------


0 Replies Last Post Apr 6, 2011, 9:55 a.m. EDT
COMSOL Moderator

Hello Gabriel Caron

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.