How to create a graph with X:Y coordinates and values and then find the shortest path?

1 回表示 (過去 30 日間)
Vlad Bibikov
Vlad Bibikov 2021 年 5 月 14 日
コメント済み: Chad Greene 2021 年 5 月 19 日
I have array with X:Y coordinates(400k), and i have another array of values for each pair of X:Y. Then i plotted points on the map with their values(in attach). I need to create graph with these points and find the shortest path from one random point to another point. Are there any ways to solve this problem without using adjacency matrix? Or how can i get this matrix?
  3 件のコメント
Vlad Bibikov
Vlad Bibikov 2021 年 5 月 16 日
I have 416609x1 var for Y coordinate and i have 416609x1 var for Y coordinate. I plotted these points. Also i have 416609x1 var with values for each. Points colored according to their values. Min value 0, max 20. For example, points with 0 are blue on the map, red ones with 20. I need to find a shortest way from one point to other point on the map. I attached example of x,y and values arrays
Chad Greene
Chad Greene 2021 年 5 月 19 日
There is some confusion because this looks like gridded data. It is unclear why you would want to find the shortest path between gridded data.
Regardless of whether or not the data are gridded, the text of your question suggests that you are talking about a traveling salesman problem. Google that phrase and you may be able to find the solution you're looking for. I know several solutions exist for it on the File Exchange.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeConstruction についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by