MATLAB: Display plotted “if loop” data in a worldmap

figuregeoshowMapping ToolboxMATLAB and Simulink Student Suitemultiple linesplot

I'm working a dataset containing Lat&Lons of multiple flightroutes. I'm plotting these into a figure, since the number of routes varies, using an if-loop plot :
figure()
for ii = 1:length(a.asdiflightplanid)
k=find(b.asdiflightplanid == a.asdiflightplanid(ii));
plot(b.longitude(k), b.latitude(k))
hold on;
end
now I want to plot these into a worldmap (USA) using the Mapping Toolbox:
worldmap([Minimal_LATPC-10 Maximal_LATPC+10], [Minimal_LONPC-5 Maximal_LONPC+5])
getm(gca,'MapProjection');
geoshow('landareas.shp','FaceColor',[224/256 224/256 224/256]);
geoshow('worldlakes.shp','FaceColor',[117/256 217/256 242/256]);
geoshow('worldcities.shp','Marker','.','MarkerEdgeColor',[118/256 122/256 121/256]);
the Minimum and Maximimu of Lat&Lon are defined before by the Lat&Lons used in the if-loop plot. But all my tries failed and mostly as a result either just receive an map of the US (geoshowing land, cities etc.), or my flightroutes in a Cartesian coordinate system, or an Error Message that I cannot combine these two plot (especially while using "plotm"). Any suggestion how I can combine these two?
Any help would be appreciated! Thanks

Best Answer

Found a solution by myself using the ismember function & creating a table with just the rows i need
A = b(ismember(b.asdiflightplanid, a.asdiflightplanid),:);
and then using geoshow
geoshow(b.latitude, b.longitude);