Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

camposm

Set camera position using geographic coordinates

Syntax

camposm(lat,long,alt)
[x,y,z] = camposm(lat,long,alt)

Description

camposm(lat,long,alt) sets the axes CameraPosition property of the current map axes to the position specified in geographic coordinates. The inputs lat and long are assumed to be in the angle units of the current map axes.

[x,y,z] = camposm(lat,long,alt) returns the camera position in the projected Cartesian coordinate system.

Examples

Look at northern Australia from a point south and one Earth radius above New Zealand:

figure
axesm('globe','galt',0)
gridm('glinestyle','-')
load topo
geoshow(topo,topolegend,'DisplayType','texturemap');
demcmap(topo)
camlight; 
material(0.6*[ 1 1 1])
plat = -50; plon = 160; 
tlat = -10; tlon = 130;
camtargm(tlat,tlon,0); 
camposm(plat,plon,1); 
camupm(tlat,tlon)
set(gca,'CameraViewAngle',75)
land = shaperead('landareas.shp','UseGeoCoords',true)
linem([land.Lat],[land.Lon])
axis off

See Also

| | |

Introduced before R2006a

Was this topic helpful?