


calc slope and aspect for kumar radiation function


0001 function [grad,asp] = kumar(dem,cs) 0002 % calc slope and aspect for kumar radiation function 0003 0004 % calculates slope and aspect (deg) using GRADIENT function 0005 [fx,fy] = gradient(dem,cs,cs); % uses simple, unweighted gradient of immediate neighbours 0006 [asp,grad]=cart2pol(fy,fx); % convert to carthesian coordinates 0007 grad=atan(grad); %steepest slope 0008 asp=asp.*-1+pi; % convert asp 0 facing south