MATLAB: I am trying to use pcolor for a graph and matrixes all have to be the same. How to reshape it

helplatlatitudelonlongitudematricesmatrix manipulationpcolorreshaperesizeshading interpsqueeze

i'm making a bathymetric map and i need to use pcolor(xlon,ylat,alt) I loaded the coast and renamed xlon=long; ylat=lat; xlon is 9865×1 ylat is 9865×1 and alt (from my data set) is 3600×2683. I have separate lon (3600×1) and lat (1×2683) from my loaded data set too, idk what to use or how to reshape it to get the matrices the same size

Best Answer

Let lon be your 3600*1, and lat be 1*2683 arrays. And the data be H 3600*2683.
pcolor(lon,lat,H') ;
shading interp
should work.