I need to connect nodes from startNode to endNode

7 vues (au cours des 30 derniers jours)
Eric Vega
Eric Vega le 3 Mai 2020
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 commentaire
Walter Roberson
Walter Roberson le 3 Mai 2020
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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Descriptive Statistics and Visualization dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by