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.

"Measure" in Matlab Livelink

Please login with a confirmed email address before reporting spam

How can get the length, area or volume of geometery using "Measure"(or another way) in matlab livelink?

model.component('comp1').geom('geom1').measure.selection.init(2); Length = model.component('comp1').geom('geom1').measure.selection.set('imp1(2)', 1)


Length =

Geometry geom1: Dimension 2: imp1(2); Boundary 1

I need the value of length,exactly


1 Reply Last Post Apr 29, 2019, 3:31 a.m. EDT
Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Apr 29, 2019, 3:31 a.m. EDT

Hi

From the programming reference manual:

To get the volume/area/length of the selected entities, enter double vol = model.component(<ctag>).geom(<tag>).measure().getVolume();

-------------------
Lars Gregersen
Comsol Denmark
Hi From the programming reference manual: To get the volume/area/length of the selected entities, enter double vol = model.component().geom().measure().getVolume();

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.