www.gusucode.com > map 案例源码 matlab代码程序 > map/ModifyGeopointObjectAndItsMetadataExample.m
%% Modify geopoint Object and Its Metadata % %% % If you typically store latitude and longitude coordinates in an _N_-by-2 % or 2-by- _M_ array, you can assign these numeric values to a geopoint % vector. If the coordinates are _N_-by-2, the first column is assigned to % the |Latitude| property and the second column to the |Longitude| % property. If the coordinates are 2-by- _M_ , then the first row is % assigned to the |Latitude| property and the second row to the |Longitude| % property. load coastlines; ltln = [coastlat coastlon]; % 9865x2 array pts = geopoint; % null constructor pts(1:numel(coastlat)) = ltln; % assign array pts.Metadata.Name = 'coastline'; pts pts.Metadata