I need to connect nodes from startNode to endNode
조회 수: 4 (최근 30일)
이전 댓글 표시
I have an array from nodes that is basically the pathway that I want to plot a line through.
Here is the array
nodes = [250 250 249 248 247 246 221 220 219...
218 193 192 167 142 141 140 139 138...
137 136 135 134 133 132 107 82 81...
80 105 104 103 102 77 52 51 26 1]
The order of the nodes is from left to right, from bottom up.

댓글 수: 1
Walter Roberson
2020년 5월 3일
Those look like they might be linear indices? But if they are... then 250 is not at an edge. The numbers you give appear to be more consistent with a 10 x 25 field than with a 15 x 25 field.
You should be able to ind2sub() and use the first output as the Y coordinate and the second output as the X coordinate.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Descriptive Statistics and Visualization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!