A mapping package for matlab

조회 수: 7 (최근 30일)
karishma inamdar
karishma inamdar 2016년 7월 5일
편집: karishma inamdar 2016년 7월 11일
I don't have mapping package for the matlab. I want to plot data points without mapping package.

채택된 답변

Chad Greene
Chad Greene 2016년 7월 6일
Karishma, The problem is you're trying to combine map coordinates with unprojected coordinates. Either is fine to use, but they won't work together. The distinction is that the Mapping Toolbox converts (lat,long) coordinates into projected values that are usually in the range of -0.5 to 0.5, so if you plot that with lats and longs that are tens to hundreds of degrees, things won't line up. Here's one option that uses unprojected coordinates. After your loop do this:
% Plot your data:
plot(long, lat,'r.');
xlabel('Longitude')
ylabel('Latitude')
% Load and plot coastline data:
C = load('coast.mat');
plot(C.long,C.lat,'b')
Or if you don't have the coast.mat file you can use my borders function:
borders('continental us','b','NoMappingToolbox')
If you want to use the Mappig Toolbox you can do:
usamap(latlim, lonlim)
plotm(lat,long)
Note, above I used plotm instead of plot.
  댓글 수: 1
karishma inamdar
karishma inamdar 2016년 7월 7일
% Load and plot coastline data: C = load('coast.mat'); plot(C.long,C.lat,'b')
With this I can see world map in my figure. How I can see only usa map?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Map Display에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by