Code covered by the BSD License  

Highlights from
Finding optimal path on a terrain

image thumbnail

Finding optimal path on a terrain

by

 

13 Nov 2012 (Updated )

Finding optimal path on a terrain using forward dynamic programming.

visualizeTerrain(T)
function visualizeTerrain(T)

% Visualize the terrain.
%
% Don't forget to hold the figure when you want to visualize the optimal 
% path using visualizePath function.
%
% manurung.auralius@gmail.com
% 17.11.201
% -------------------------------------------------------------------------

[m, n] = size(T);

[X,Y] = meshgrid(1 : n, 1 : m);
surf(X, Y, T(1 : m, 1 : n));

end

Contact us