mphmeasure
Measure entities in geometry
Syntax
[measure, misc] = mphmeasure(model,geomtag,entity,...)
Description
[measure, misc] = mphmeasure(model,geomtag,entity,...) measure the entity with the type entity in the geometry defined with the tag geomtag. entity can be one of 'point', 'edge', 'boundary', or 'domain'.
The function mphmeasure accepts the following property/value pairs:
on | off | string
on | off
Example
Get the volume of all domains in the geometry:
model = mphopen('busbar');
vm = mphmeasure(model,'geom1','domain')
Get the volume and the surface area of all domains in the geometry:
[vm, am]= mphmeasure(model,'geom1','domain')
Get midpoint and distance between points 2 and 4:
[m, dist] = mphmeasure(model,'geom1','point','selection',[2,4])
Length of edges bounded by vertex 1, 29, 41 and 42:
[~, a] = mphgetadj(model,'geom1','edge','point',[1,29,41,42])
mphviewselection(model,'geom1',[1,29,41,42],'point')
hold on
mphviewselection(model,'geom1',a,'edge','edgecolorselected','b')
m = mphmeasure(model,'geom1','edge','selection',a)