Hy,
I use R2015a, and I want to plot lat and lon anywhere on a map, but :
Undefined function or variable 'geoplot'.
Error in Untitled (line 7)
geoplot(lat,lon);
how else can i do in a simple way?
Thanks!

 採用された回答

Cris LaPierre
Cris LaPierre 2022 年 6 月 8 日

0 投票

The geoplot function was introduced in R2018b (see here). You will need to update your version to at least that version to be able to use geoplot.
A separate version was introduced to the Mapping Toolbox in R2022a (see here) If that is what you want to use, you must be on R2022a and have the Mapping Toolbox installed.

3 件のコメント

Cristian Martin
Cristian Martin 2022 年 6 月 8 日
I managed to do like this:
lat = 9.0077;
lon = 26.0784;
worldmap 'africa'
axis off
getm(gca,'MapProjection')
geoshow('landareas.shp','FaceColor',[0.5 0.7 0.5])
plotm(lat, lon,'o');
Instead I want to set a rectangular map with my coordinates , for example like this:
I want to set the limits of map, i dont care if its a simple view of the map , could yougive me a direction?
Cris LaPierre
Cris LaPierre 2022 年 6 月 8 日
The shape and lmites of the map can be set by you. You could adjust the following code:
lat = 9.0077;
lon = 26.0784;
axesm('MapProjection','miller','MapLatLimit',[-30 30],'MapLonLimit',[-10 45])
geoshow('landareas.shp','FaceColor',[0.5 0.7 0.5])
plotm(lat, lon,'o');
If you want country borders, that may be a bit trickier if you are lmited to R2015a. I suggest looking at this Answer from 2014
Cristian Martin
Cristian Martin 2022 年 6 月 8 日

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGeographic Plots についてさらに検索

製品

リリース

R2015a

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by