How to merge data with latitude and longitude?

5 vues (au cours des 30 derniers jours)
pink flower
pink flower le 16 Jan 2021
Réponse apportée : KSSV le 17 Jan 2021
Hi. I have a data matrix and I need to open it in an image. However, I need to cross this data with the latitude and longitude and put the latitude and longitude on the axes of the figure. How can I proceed? Below is an example of the data and the latitude and longitude matrix. It has 1000 points in x and 1000 points in y.
file = fopen('2014061500000200dBR.dpsri.PROD');
rain = fread(file,[1000 1000], 'float32');
test = find(rain<0);
rain(test) = NaN;
imagesc(rain);
view([-90,-90]);
colorbar;
latitude = [-3.63965:-0.00449:-8.12601];
longitude = [-37.5098:0.00453:-32.9831];
L1 = 1;
L2 = 1000;
for LL = L1:L2;
matrix_latitude (1:1000,LL) = latitude;
end
matrix_lat = matrix_latitude(1:1000,1:1000);
matrix_lat;
for Lll = L1:L2;
matrix_longitude(Lll,1:1000) = longitude;
end
matrix_long = matrix_longitude(1:1000,1:1000);
matrix_long;

Réponses (1)

KSSV
KSSV le 17 Jan 2021
latitude = [-3.63965:-0.00449:-8.12601];
longitude = [-37.5098:0.00453:-32.9831];
[matrix_latitude, matrix_longitude] = meshgrid(latitude,longitude) ;

Catégories

En savoir plus sur Geographic Plots dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by