I need to connect nodes from startNode to endNode

4 ビュー (過去 30 日間)
Eric Vega
Eric Vega 2020 年 5 月 3 日
コメント済み: Walter Roberson 2020 年 5 月 3 日
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
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 ExchangeDescriptive Statistics and Visualization についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by