Programmatically get edge ids from geometry of femodel
Show older comments
I am using matlab's pde toolbox and setup a geometry for femodel like this:
gd = [3 4 0 1 1 0 0 0 1 1]'; % Example: A simple square
sf = 'S1';
ns = ('S1')';
[g,bt] = decsg(gd, sf, ns)
fe = femodel(AnalysisType="electrostatic", Geometry=g);
fe.PlanarType = "axisymmetric";
figure(1); clf;
pdegplot(fe, 'EdgeLabels', 'on', 'FaceLabels','on');
axis equal off;
I can get a diagram indicating which edge-id is assign to an edge:

The resulting geometry does not contain information, which vertices form the edges:
>> fe.Geometry
ans =
fegeometry with properties:
NumFaces: 1
NumEdges: 4
NumVertices: 4
NumCells: 0
Vertices: [4×2 double]
Mesh: []
How can I retrieve which edge id belongs to which vertices in the geometry.
How can I retrieve which edge id is where programmatically?How can I retrieve which edge id is where programmatically?
Accepted Answer
More Answers (0)
Categories
Find more on Geometry and Mesh in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!