Ploting places rather than outlines from SHP files

1 view (last 30 days)
Hi
Excuse the fundamentals that I am sure will be wrong here - I am brand new to MatLab and trying to rework some existing code.
mstruct = defaultm('utm');
mstruct.zone = utmzone(centerLoc(1),centerLoc(2));
mstruct = defaultm(mstruct);
countries = shaperead([SHPdir 'ne_10m_admin_0_countries.shp'],...
'Selector',{@(x) strcmpi(x,'GB'),'ISO_A2'},'UseGeoCoords', true);
airports = shaperead([SHPdir 'ne_10m_airports.shp'],...
'Selector',{@(x) strcmpi(x,'major'),'type'},'UseGeoCoords', true);
[x,y] = mfwdtran(mstruct,[countries.Lat airports.Lat],[countries.Lon airports.Lon]);
[xc,yc] = mfwdtran(mstruct,centerLoc(1),centerLoc(2));
plot(x,y,'-k')
Plotting just the countries outline works fine, but trying to plot point locations for the airports (ideally labelled points) just gives me lots of random straight lines.
All help appreciated.
Thanks very much Kevin

Answers (0)

Community Treasure Hunt

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

Start Hunting!