Using loops to find cumulative data
Show older comments
Hi MatLab wizards,
I have an assignment question that I just can't figure out how to complete.
I have a txt file with earthquake data(year month day hour minute second lat long depth magnitude), I have to create an array of all earthquakes of magnitude 7 and higher for each year.
This is what I have so far.
eq_cat=load('usgs_events.txt');
Mag_7=find((eq_cat(:,10)>=7));
Then I need to use find for something similar to this
for i=1920:2020
Mag_7_year=find((eq_cat(:,10)>=7)&(eq_cat(:,1)==i))
But I really don't know where to go next.
Can anyone help?
Thanks
Edit: text file uploaded, careful it's almost 76,000 lines long
1 Comment
madhan ravi
on 25 Feb 2019
upload text file
Accepted Answer
More Answers (0)
Categories
Find more on Seismology in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!