SO503 Exam 2 Spring 2016 Solution

This is the general flow; some steps may not be required.  You can also put this inside another loop, to process multiple files.  This is the conceptual flow (pseudo code); you have to look up exactly how Matlab, or other programming languages, handles it.


The pseudo code below shows each requirement in turn.  You could actually put them all into one program, and just put the code into the correct location in the framework.  Location matters, whether you are inside the loop or outside, before or after the fgetl.  The key code for each requirement is given in red

Need for this case, to get the important parts of each earthquake.


To get the number of quakes (many other possibilities exist, but counting the number of lines in the file will not work)


Get vectors for just the deep earthquakes


Deal with magnitudes


Get azimuth, from the last line in the record.


last revision 458/2017