필터 지우기
필터 지우기

Extracting matrix and making 2D plot

조회 수: 1 (최근 30일)
Chihiro Omori
Chihiro Omori 2019년 3월 19일
댓글: Chihiro Omori 2019년 4월 2일
I made 2-D color map by using those datasets below
  • latmat.mat... latitude data (171*171)
  • lonmat.mat...longitude data(171*171)
  • CH4.mat.... CH4 emission data (171*171)
Coding is as follows,
figure
latlim=[min(latmat(:)) max(latmat(:))]
lonlim=[min(lonmat(:)) max(lonmat(:))]
ax=usamap(latlim,lonlim);
title('Air Pollution Map');
surfm(latmat,lonmat,CH4)
states=shaperead('usastatehi',...
'UseGeoCoords',true,'BoundingBox',[lonlim',latlim']);
geoshow(ax,states,'FaceColor','none')
contourcbar
And got this figure below.
However, I would like to make a map within those ranges below.
70W<Longitude<75W
40N<Latitude<43N
How can I extract the datasets and make a colormap?

채택된 답변

Krishna Zanwar
Krishna Zanwar 2019년 3월 22일
You can change the limits by replacing
latlim=[min(latmat(:)) max(latmat(:))]
lonlim=[min(lonmat(:)) max(lonmat(:))]
by
lonlim=[-75 -70];
latlim=[40 43];
I have attached the output of the graph below.
Hope it helps.
  댓글 수: 1
Chihiro Omori
Chihiro Omori 2019년 4월 2일
Thank you for your answer! That is what I actually needed!
I have one more question.
How can I extract the emission dataset from the matrix ?
For example, I would like to extract CH4 emission data in the range of ...
  • lonlim=[-75 -70];
  • latlim=[40 43];
and make a matlab matrix file like CH4.mat.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by