Asked by jana
on 26 May 2013

Can any body provide a code for label correcting algorithm for shortest path. Thankyou!

Answer by Image Analyst
on 26 May 2013

Perhaps Steve's blog would be helpful to you: http://blogs.mathworks.com/steve/2011/11/01/exploring-shortest-paths-part-1/

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn moreOpportunities for recent engineering grads.

Apply Today
## 6 Comments

## Image Analyst (view profile)

Direct link to this comment:https://www.mathworks.com/matlabcentral/answers/76989#comment_151005

Describe what the "label correcting algorithm" is.

And do you

already havethe shortest path, or do you still need to find it?## Walter Roberson (view profile)

Direct link to this comment:https://www.mathworks.com/matlabcentral/answers/76989#comment_151012

It

sortof sounds like there might be a known path but with something changed after it was calculated, and now the path needs to be "tweaked" to adjust to the new conditions. As a guess.## jana (view profile)

Direct link to this comment:https://www.mathworks.com/matlabcentral/answers/76989#comment_151297

Here's the label correcting algorithm. It is similar to dijiktras algorithm except that we are maintaining the node list rather than the arc list. I am not really sure how to code this algorithm especially when we also have to keep track of the LIST.

## jana (view profile)

Direct link to this comment:https://www.mathworks.com/matlabcentral/answers/76989#comment_151298

Regarding the second question: Yes I still need to find the shortest path.

## Walter Roberson (view profile)

Direct link to this comment:https://www.mathworks.com/matlabcentral/answers/76989#comment_151304

## jana (view profile)

Direct link to this comment:https://www.mathworks.com/matlabcentral/answers/76989#comment_151324

thankyou! that was of great help.