Hi, I have data which has information for different events, each event has 5 row information. I just want to eleminate this data and delete all of 5 line for that event with respect to some criteria and to create new data file without eleminated data.
A = xlsread('esx.xls');Mag = cell(1,length(4:5:size(A,1))); %Preallocate Mag for speed
k = 1;for i= 4:5:size(A,1) %%%determining magnitudes%%%
Mag{k}=A(i-3,7); if Mag{k}>5.1 fprintf('Magnitude > 5.7 \n'); end k=k+1;end
For example in this case I want to look at 6th row, 7th column value for first event , 11th row 7th column for second, 16th row, 7th column for third and so on (which is defined as Mag{}). If that value is smaller than 5.1, program should delete all 5 line information about that event and write 5 line information of each event with mag value bigger than 5.1 to new xlsx or txt file.
Any suggestions for this code ? I also attached my data in xls format. Thanks in advance.
Best Answer