Given a set of longitude and latitude, what is the optimal way to group the data into a matrix n*m where n and m would be respectively the height and depth of the matrix?
Hello. From your problem description, it seems to me that meshgrid is the function you are looking for. Have a look if this helps you: https://www.mathworks.com/help/matlab/ref/meshgrid.html