필터 지우기
필터 지우기

how to fill data in map

조회 수: 5 (최근 30일)
devendra
devendra 2014년 5월 16일
편집: devendra 2014년 6월 14일
sir i want to plot my own data in map.please help me. how will do this thing?thank you in advance.please sir help me.
  댓글 수: 3
Kelly Kearney
Kelly Kearney 2014년 5월 28일
Do you have the Mapping Toolbox? If not, I'd recommend m_map.
While GIS might be quicker (if you have access to it), you can make some pretty nice maps in Matlab too... but it takes some work, and you need to gather all the necessary data files.
devendra
devendra 2014년 6월 9일
편집: devendra 2014년 6월 9일
sir i want to do same thing on matlab.please help me sir.

댓글을 달려면 로그인하십시오.

답변 (1개)

Chad Greene
Chad Greene 2014년 5월 29일
I disagree with the comments above. If you have the Mapping Toolbox, it's only a couple of lines in Matlab. If you have gridded rainfall data rainfall corresponding to lat and lon matrices, it would look something like this:
worldmap('india')
pcolorm(lat,lon,rainfall)
You'll have to search the web for shapefiles or coordinates of political borders and rivers, then plot them using geoshow or plotm.
  댓글 수: 4
Chad Greene
Chad Greene 2014년 5월 30일
You'll have to be more specific about what data you have and what your goal is. You've given us some lat/lon coordinates, but you have not told us what they correspond to. Your data may correspond to LATxLONxTIME. You haven't told us much about your third dimension. It might be eight years of annual rainfall totals. Or perhaps the first slice is rainfall, the second slice is average temperature, third is population density--we have no way of knowing unless you tell us.
Note that a 20x22 map will not have the high resolution of the example you attached to your original question.
Also, type ver into the command line--it should tell you if you have the Mapping Toolbox.
LAT = [7.7042;
9.1050;
10.505;
11.9065;
13.3073;
14.7081;
16.1088;
17.5096;
18.9104;
20.3111;
21.7119;
23.1127;
24.5134;
25.9142;
27.3150;
28.7157;
30.1165;
31.5172;
32.9180;
34.3188;
35.7195;
37.1203];
LON = [68.9062;
70.3125;
71.7188;
73.1250;
74.5312;
75.9375;
77.3438;
78.7500;
80.1562;
81.5625;
82.9688;
84.3750;
85.7812;
87.1875;
88.5938;
90.0000;
91.4062;
92.8125;
94.2188;
95.6250];
SomeData = rand(20,22,8); % <- Some random data
Slice1 = SomeData(:,:,1); % <- PLOT ONLY THE FIRST SLICE
latgrid = repmat(LAT',20,1);
longrid = repmat(LON,1,22);
% If you do not have the mapping toolbox, do this:
pcolor(longrid,latgrid,Slice1)
xlabel('degrees longitude')
ylabel('degrees latitude')
shading flat
% If you do have the mapping toolbox, do this:
worldmap('india')
pcolorm(latgrid,longrid,Slice1)
devendra
devendra 2014년 5월 31일
편집: devendra 2014년 5월 31일
sir i have 8 years annual rainfall data and sir my data size is (20x22x8)(lon,lat,time)third dimension is time ...sir i have also another data (20*22*2920)(lon,lat,time) this is daily data.i want to also plot this like this.
sir this code is not working as i want output.sir i want to fill my data in india map like given in question figure please help me sir.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Mapping Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by