I tried to look for a solution through chatgpt and the following was suggested:
Swap these lines below:
cgeo=input('Informe a coordenada (graus) do local de estudo /Ex: [-02.133333 -58.983609]:');
pixe_l=input('Informe o pixel, cujo centro é local de estudo /Ex: [15]:');
lat_n=cgeo(1,1)+((pixe_l(1,1)./2)./111.1);
lat_s=cgeo(1,1)-((pixe_l(1,1)./2)./111.1);
lon_e=cgeo(1,2)+((pixe_l(1,1)./2)./111.1);
lon_w=cgeo(1,2)-((pixe_l(1,1)./2)./111.1);
And insert these:
coords = [-1.473137 -48.485657;
-2.452059 -54.753617;
-3.217477 -52.230464;
-5.394255 -49.135187;
-4.27 -52.60;
-1.2345 -45.6789]; % Adicione aqui as 6 latitudes e longitudes específicas que você deseja coletar
pixe_l=input('Informe o pixel, cujo centro é local de estudo /Ex: [15]:');
for i = 1:size(coords, 1)
lat_n(i) = coords(i, 1) + ((pixe_l(1,1)./2)./111.1);
lat_s(i) = coords(i, 1) - ((pixe_l(1,1)./2)./111.1);
lon_e(i) = coords(i, 2) + ((pixe_l(1,1)./2)./111.1);
lon_w(i) = coords(i, 2) - ((pixe_l(1,1)./2)./111.1);
end
But I was not successful