Gistlib Logo

gistlib

%% step 4: reconstruction of path in matlab

main.m
function path = reconstructPath(cameFrom, current)
    path = [current];
    
    while isfield(cameFrom, num2str(current))
        current = cameFrom.(num2str(current));
        path = [current, path];
    end
end
215 chars
9 lines

similar matlab code snippets

how ti create an a star algorithm in matlab
create a theta star algorithm in matlab
sokoban game in matlab
how to calculate the 99th percentile in matlab
how to perform a ztest in matlab
how to calculate the normal distribution in matlab
how to calculate the binomial distribution in matlab
how to calculate cumulative distribution function in matlab
how to plot the binomial distribution in matlab
calculate the area of a triangle in matlab

related categories

matlab
pathfinding

gistlibby LogSnag