View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

Be the first to rate this file! 5 Downloads (last 30 days) File Size: 2.4 KB File ID: #43918 Version: 2.0



ja (view profile)


16 Oct 2013 (Updated )

ND max path using dynamic programming

| Watch this File

File Information

takes three values - two of which are optional:
II is the cost function (required)
wt is the weight matrix, used to provide weighted direction. If none is specified a 3x3x... matrix of ones is created for the weights.
dm is the dimension through which the path is to be found. If none is specified, dm is set to the last dimension.
returns a linearly indexed 1D line through the cost function starting at the first surface in the dmth dimension and finishing at the last surface in the dmth dimension. The line corresponds to the line that can be found with the maximum sum of values along that line, with constraints specified by the weight function.

min path can be found, instead of max path, by setting II = -II

Required Products MATLAB
MATLAB release MATLAB 7.14 (R2012a)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
21 Mar 2016 ja

ja (view profile)

It's a fairly standard method. If you are looking for documentation, I pulled the algorithm out of a textbook ( Image Processing, Analysis, and Machine Vision - Sonka, Hlavac, Boyle - Third Edition - Chapter 6.2 - Algorithm 6.13: boundary tracing as dynamic programming)

Comment only
09 Feb 2016 IQ

IQ (view profile)

Hi. are you have documentation for this method. and actually I want to know it's shortest path or this is different method..
So pleas if anyone can help me

Comment only
27 May 2015 2.0

Removed some things I didn't mean to leave in, and updated it to handle an ambiguous number of dimensions.

Contact us