Hi Filippo Bocchi,
The orientation issue with your map is likely due to the way you are creating the arrays for latitude (lat) and longitude (lon), particularly in terms of the sequence and direction you have chosen for them. It appears there is a mix-up in calculating "dlat" and "dlon"; the correct approach would be to calculate "dlat" based on the image's height (number of rows) and "dlon" according to its width (number of columns).
Considering the coordinates you have mentioned (110°E to 115°E and -23°S to -20°N), your map is expected to stretch from the west to the east along the x-axis and from the north to the south along the y-axis.
Please modify your code as shown in the following code snippet:
filename = 'ningaloo_etopo.tiff';
% Load data
etopo = imread(filename);
% Convert to floating point data
etopo = double(etopo);
% Create lon and lat arrays
laS = -23.00;
laN = -20.00;
loW = 110.00;
loE = 115.00;
% Correcting dlat and dlon calculation
dlat = (laN - laS) / (size(etopo, 1) - 1); % Latitude difference divided by the number of rows
dlon = (loE - loW) / (size(etopo, 2) - 1); % Longitude difference divided by the number of columns
lat = laN:-dlat:laS; % Corrected to increase from South to North
lon = loW:dlon:loE; % Corrected to increase from West to East
% Visualise using pcolor
figure(1)
clf
pcolor(lon,lat,etopo)
hold on
contour(lon,lat,etopo, [0, 0], 'k')
Here is the output obtained from the above code.
Hope this helps!