Using loops to find cumulative data
Mostrar comentarios más antiguos
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 comentario
madhan ravi
el 25 de Feb. de 2019
upload text file
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Seismology en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!