I am using the GRADIENTM function to calculate the gradient of a data grid. The data grid is read from a TIFF file whereas the referencing vector is extracted from a TFW worldfile:
[X, cmap] = imread('concord_ortho_w.tif');refvec = worldfileread('concord_ortho_w.tfw');[aspect,slope,gradN,gradE] = gradientm(X,refvec)
but I receive the following error:
??? Error using ==> convertToGeoRasterRef at 71 In combination with the number of rows in the raster grid, 2000, the input referencing vector or matrix implies latitude limits that extend outside the interval [-90 90] degrees. Error in ==> gradientm at 120 R = convertToGeoRasterRef(R, size(map), 'degrees', mfilename, 'R', 2);
Best Answer