Dijkstra's algorithm \ shortest paths

https://en.wikipedia.org/?title=Dijkstra%27s_algorithm#/media/File:Dijkstras_progress_animation.gif
----how to do this? ----thanks alot :D ----this picture is taken from wiki:https://en.wikipedia.org/?title=Dijkstra%27s_algorithm

4 Comments

Additional information: There is the map: (Composite by 0011...) the black part is obstacle.
and I want to start form one point(ex: index (8,2))and find the shortest path to the end point. Also, count the distance. For one point ,it has eight direction to go. such as up,down,left,right,and the distance=1.At the other direction, the distance=square root(2). the result looks like the picture below .I draw it using Paint,so it has wrong scale ><.
Evidently you didn't see my answer, or if you did, you didn't look as far as part 5 in the blog
Looks pretty similar to what you're asking for. Did you actually even try Steve's code?
Thank you a lot. You guys answering efficiency is super. The concept in the steve's blog is very helpful. Then I feel that I really really need to buy the image tool box right now.兇闢

Sign in to comment.

Asked:

Amy
on 18 Jun 2015

Commented:

Amy
on 22 Jun 2015

Community Treasure Hunt

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

Start Hunting!