% Script to manipulate a struct file called airport

% Load the struct array first
load airport

% Check the length of the struct array using "length" command
% Assign the length of the struct file to a variable called
% "numberOfAirports"

numberOfAirports = length(airport);         % retrieves the length of the array

% Create a for loop to plot the locations of these airports

% Load USA map

load usamap
    plot(uslon,uslat,'k')

hold on          % keeps the plot active throughout the for loop
for i=1:numberOfAirports
    plot(airport(i).location.longitude,airport(i).location.latitude,'o')
end