- Get coordinates of the midpoints in all existing lines.
- Add the midpoints to your original points and you have the new points array
- Create two lines from each of the original lines, using the new midpoints.
How to divide many lines ?
1 回表示 (過去 30 日間)
古いコメントを表示
Hello, need little help with one problem.
I have code which making a construction and I need to divide every line.
clc
clear
nodes=[0 0 %X-coord, Y-coord
0 -10
10 -12
10 0
20 -10
20 0];
Nnodes = size(nodes,1);
lines = [1 2 %1.node, 2.node
2 3
3 4
3 5
5 6 ];
Nlines = size(Nlines,1);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1278230/image.png)
and then of course I also need the correct matrices with all nodes and lines
hope, you will help me.
Thanks
0 件のコメント
回答 (1 件)
Jiri Hajek
2023 年 1 月 30 日
Hi, since your oibjective is to split all existing lines, its sufficient to:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!