Code covered by the BSD License
function st = gopath(A) % Thanks to Roy Mathew for this line st = find(bwlabel(A == A(1),4) == 1); end
Contact us at files@mathworks.com