Matlab-help.. Getting gray hairs!!


bommal
08-07-2008, 10:34 AM
Hi- As part of my master thesis (not programming.. Geophysics) I have a HUGE problem with my matlab coding. I have a program that works for 1 event but I need to make it work for many events. My problem is: I read one txt-file with different caracters separated by a delimiter. It starts with a 1 in line 1 and 2 in line 2 and so forth.. And then I read another txt-file that are a lot longer than file no 1 and it has a 1 in the first 25 lines and a 2 in the next 24 lines and so forth. To understand better: file 1 is a list of earthquakes (the data for 1 quake for each line) and file 2 is a list of the datas from the stations who have measured the quake (25 stations for earthquake 1 and 24 (sometimes different) stations for earthquake 2). In my program I do simple stuf like finding mean values and plot paths and so but it is very important that it does it for each event. Right now the program belives that all the stations have measured all the earthquakes!!!
Please help me- 'cause I'm getting gray hairs :confused:)