clc close all clear RUTA='D:\MATLAB Doc'; % Here I changed the text files with the acoustic info to find false % positives click trains of dolphins. We used "click details" to export % information of CP3 files of sightings of dolphins. In this files, the routine calculated the mean. % But also could be used the "full train details" to export information of % CP3. In this files it is already calculated the mean. In this way, the % routine only check if the mean value of the train was in the interval of % the intervals value of the dolphin signature. data=load('Click_trains_2015.txt'); % Example with click trains of 2015 field season trainID=data(:,1); minF=data(:,2); maxF=data(:,3); AvNcycles=data(:,4); AvBW=data(:,5); NofClx=data(:,6); modalKHz=data(:,7); nActualClx=data(:,8); Clxs=data(:,9); avSPL=data(:,10); Date=data(:,12); % Simple deterministic routine to find false positive dolphin click trains diary Dolphins_Click_Trains_AccuraccyAlgoritm.txt for i=1:max(trainID) % disp(i) tag=find(trainID==i); % Modal_khz=(modalKHz(tag)); % For calculating mean per train (in "click deatails" files) include "mean": mean(modalKHz(tag)); prom_cycles=(AvNcycles(tag)); % For calculating mean per train (in "click deatails" files) include "mean": mean(AvNcyccles(tag)); if isnan(Modal_khz)% disp('Absence of trains') else if Modal_khz>=44 && Modal_khz<=111 % disp('Frequency mean rule is right for dolphins') if prom_cycles>=4 && prom_cycles<=8.5 % disp('Ncycles mean is also ok for dolphins') else disp('Not labeled as dolphin click train ') % end else disp('Not labeled as dolphin click train') end end end diary off disp('Ready')