%The lat long values below represent the points that make up the %outline of the Oklahoma border in Figure 1% lat = [36.99 35.38 33.64 33.95 33.72 34.12 34.55 36.46 36.49 36.98 36.99]; long = [94.61 94.44 94.49 95.20 96.34 98.32 100 99.99 103.01 103.01 94.61]; figure(1) clf plot(-1.*long, lat, 'k-') %Below I loaded the seismic data for Oklahoma from 2010-2015 and %defined the year, latitude, longitude, depth, and magnitude% load('OKeqs2010_2015.txt','-ascii') EqDate=OKeqs2010_2015(:,1); EqLat=OKeqs2010_2015(:,4); EqLong=OKeqs2010_2015(:,5); EqDepth=OKeqs2010_2015(:,6); EqMag=OKeqs2010_2015(:,7); plot(EqLong,EqLat,'k.',-1.*long, lat,'k-') title('Oklahoma Seismicity Data 2010-2015') xlabel('Longitude') ylabel('Latitude') %For figure 2 I defined the month and day for the data to apply the %decimal year equation% figure(2) EqMonth=OKeqs2010_2015(:,2); EqDay=OKeqs2010_2015(:,3); EqDecYear=EqDate+(EqMonth/12)+(EqDay/365); %After defining decimal year, I created a viable bin range for the %data, and then defined the histogram parameters% Edges=2.0101e+03:.5:2.0159e+03 Edges = 1.0e+03 * Columns 1 through 9 2.0101 2.0106 2.0111 2.0116 2.0121 2.0126 2.0131 2.0136 2.0141 Columns 10 through 12 2.0146 2.0151 2.0156 n=histc(EqDecYear,Edges) n = 92 109 48 149 51 45 134 241 922 2095 2536 0 %Then I created the bar graph/histogram with the bin range provided %above% bar(Edges,n,'histc') xlabel('Year') ylabel('Number of Earthquakes') title('Earthquakes per Year')