How do extract boundary nodes in matlab?
6 ビュー (過去 30 日間)
古いコメントを表示
I am trying to extract all of the boundary notes for an ellipse from PDEModeler (pictured below). I know that the boundary nodes are 1:24 but when I use the following code I get extra entries. My nodes for the whole system are as follows:
gd =
4.0000
0.0033
-0.0082
0.9967
0.4704
0
Then I wish to find the boudnary nodes. To do this I follow a similar appraoch to Larson's Finite Element book:
fixed=boundary(nodes(:,1),nodes(:,2),1)%Finds boundary points for complex geometries
T=sort(fixed);
T' =
Columns 1 through 12
1 1 2 3 4 5 6 7 8 9 10 11
Columns 13 through 24
12 13 14 15 16 17 18 19 20 21 22 23
Columns 25 through 36
24 26 26 28 33 38 41 42 49 52 53 65
But we know that the only entries should be 1:24. If anyone could help, I'd greaty appreciate it.
![Ellipse.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/204408/Ellipse.jpeg)
1 件のコメント
Javad Bagheri
2019 年 3 月 16 日
hello my friend
im trying to extract the boundry nodes from pdemodeler and i couldn't yet
please help me,
this is my email adress:
javadbagheri019@gmail.com
would you please send me whole code, thanks a lot
採用された回答
Image Analyst
2019 年 2 月 16 日
If you have the (x,y) coordinates of all those points, call convhull() to get the indexes of those that are on the convex hull.
その他の回答 (1 件)
Mohammed Abdallatif
2019 年 6 月 27 日
編集済み: Mohammed Abdallatif
2019 年 6 月 27 日
I do this using the neighbour function implemented in Matlab.: N = neighbors(G,nodeID)
Imagine you clustered the data in x clusters, you can identify the boundary nodes easily as those nodes who are member (you might use the ismember function as well) of a cluster:
, and have nighbours which are mbers of an other cluster ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226643/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226642/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226643/image.png)
Applysing this for a 9 Node graph as below, yiels to the following list of boundary nodes BN:
BN = [4 6 5 7 8 9]
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226644/image.png)
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!