| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Mapping Toolbox |
| Contents | Index |
| Learn more about Mapping Toolbox |
[newlat,newlon] = antipode(lat,lon)
[newlat,newlon] = antipode(lat,lon,angleunits)
[newlat,newlon] = antipode(lat,lon) returns the geographic coordinates of the points exactly opposite on the globe from the input points given by lat and lon. All angles are in degrees.
[newlat,newlon] = antipode(lat,lon,angleunits) specifies the input and output units with the string angleunits. The string angleunits can be either 'degrees' or 'radians'. It can be abbreviated and is case-insensitive.
Given a point (43ºN, 15ºE), find its antipode:
[newlat,newlong] = antipode(43,15)
newlat =
-43
newlong =
-165 or (43ºS, 165ºW).
Perhaps the most obvious antipodal points are the North and South Poles. The function antipode demonstrates this:
[newlat,newlong] = antipode(90,0,'degrees')
newlat =
-90
newlong =
180 Note that in this case longitudes are irrelevant because all meridians converge at the poles.
Find the antipode of the location of the Mathworks corporate headquarters in Natick, Massachusetts. Map the headquarters location and its antipode in an orthographic projection. Begin by specifying latitude and longitude as degree-minutes-seconds and then convert to decimal degrees.
mwlat = dms2degrees([ 42 18 2.5]) mwlon = dms2degrees([-71 21 7.9]) mwlat = 42.3007 mwlon = -71.3522 [amwlat amwlon] = antipode(mwlat,mwlon) amwlat = -42.3007 amwlon = 108.6478
Prove that these points are antipodes:
dist = distance(mwlat,mwlon,amwlat,amwlon) dist = 180.0000
The distance function shows them to be 180 degrees apart.
Generate a map centered on the original point:
subplot(1,2,1)
axesm ('MapProjection','ortho','origin',[mwlat mwlon],...
'frame','on','grid','on')
load coast
geoshow(lat,long,'displaytype','polygon')
geoshow(mwlat,mwlon,'Marker','o','Color','red')
s = ['Looking down at (' angl2str(mwlat,'ns') ...
',' angl2str(mwlon,'ew') ')'];
title(s)
Add a second map centered on the computed antipodal point:
subplot(1,2,2)
axesm ('MapProjection','ortho','origin',[amwlat amwlon],...
'frame','on','grid','on')
geoshow(lat,long,'displaytype','polygon')
geoshow(amwlat,amwlon,'Marker','o','Color','red')
t = ['Looking down at (' angl2str(amwlat,'ns') ...
',' angl2str(amwlon,'ew') ')'];
title(t)

![]() | angledim | arcgridread | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |