Re: [Scilab-users] Compute gradients of grid data

2024-04-05 Thread Lamy Alain
ling list for Scilab. Subject: [Scilab-users] Compute gradients of grid data Hello, I am looking to create a hillshade function, but issues arise defining the the X and Y gradients. The test code so far: function [grad_x, grad_y] = compute_gradients(dem) grad_x = diff(dem, 1, 'c')

[Scilab-users] Compute gradients of grid data

2024-04-05 Thread Lester Anderson
Hello, I am looking to create a hillshade function, but issues arise defining the the X and Y gradients. The test code so far: function [grad_x, grad_y] = compute_gradients(dem) grad_x = diff(dem, 1, 'c'); grad_y = diff(dem, 1, 'r'); endfunction // Create a test DEM grid dem=[1.23 1.4