How to merge data with latitude and longitude?
    조회 수: 2 (최근 30일)
  
       이전 댓글 표시
    
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;
댓글 수: 0
답변 (1개)
  KSSV
      
      
 2021년 1월 17일
        latitude = [-3.63965:-0.00449:-8.12601];
longitude = [-37.5098:0.00453:-32.9831]; 
[matrix_latitude, matrix_longitude] = meshgrid(latitude,longitude) ;
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

