필터 지우기
필터 지우기

Shotest path between any two nodes in the graph

조회 수: 1 (최근 30일)
Rama Sidhardha Yeleti
Rama Sidhardha Yeleti 2019년 2월 22일
편집: Keegan Carvalho 2019년 3월 2일
Hello everyone, I'm new to matlab. My doubt is that I have data which consists of nodes(road network data) that i created in the Arcmap. Now my question is that will I be able to import that data and find the distance(shortest distance) between any two nodes by using any of the algorithms like(kruskal,dijkstra's,prim's.....) If it can be done can anyone please help me to sort out the same.

답변 (3개)

Steven Lord
Steven Lord 2019년 2월 22일
See the graph and network algorithms functionality included in MATLAB. The shortestpath, shortestpathtree, and/or distances functions may be of use to you.

Christine Tobler
Christine Tobler 2019년 2월 22일
To read data from Arcmap, you would probably need to use the Mapping Toolbox (for example shaperead). To use the shortest path algorithm provided by the graph class, you would need to construct a graph object from this data, with each edge containing the length of the path between two nodes.
  댓글 수: 1
Rama Sidhardha Yeleti
Rama Sidhardha Yeleti 2019년 2월 25일
편집: Rama Sidhardha Yeleti 2019년 2월 26일
Thanks Christine Tobler for your answer and will I be able to import arc files(.mxd files)into matlab?(means can you please tell the command for the importing the .mxd files)

댓글을 달려면 로그인하십시오.


Keegan Carvalho
Keegan Carvalho 2019년 3월 2일
편집: Keegan Carvalho 2019년 3월 2일
If I may, I have worked with ArcGIS and I don't think you can import .mxd files in Matlab. To the best of my knowledge, you can import geotiffs and shapefiles.
Regarding the shortest path objective, if you can get your data as matrices, then you could create digraphs and carry out your analysis. Some links:
You may try exporting your shapefile attribute into a csv file and then import in Matllab.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Networks에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by