FUNCTION REFERENCE
findNodes
Find node IDs in a 2-D PDE mesh by region, box, radius, or nearest point.
Find node IDs in a 2-D PDE mesh by region, box, radius, or nearest point.
Syntax
ids = findNodes(mesh, 'region', 'Edge'|'Face', regionIDs); ids = findNodes(mesh, 'box', xlim, ylim); ids = findNodes(mesh, 'radius', center, r); ids = findNodes(mesh, 'nearest', points)Returns a row vector of 1-based node IDs in a pde.FEMesh object. 'region', 'box', and 'radius' return sorted, unique IDs. 'nearest' accepts a 2-by-P matrix of query coordinates and returns a 1-by-P vector of nearest node IDs preserving query order.
Example
R1=[3;4;0;1;1;0;0;0;1;1]; dl=decsg(R1); m=createpde(); geometryFromEdges(m,dl); mesh=generateMesh(m,'Hmax',0.5,'GeometricOrder','linear'); numel(findNodes(mesh,'box',[0 1],[0 1])) == size(mesh.Nodes,2)Differences from MATLAB: 2-D meshes only; 'Vertex' and 3-D 'Cell' region types are not supported.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.