Using loops to find cumulative data
Ältere Kommentare anzeigen
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 Kommentar
madhan ravi
am 25 Feb. 2019
upload text file
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Seismology finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!