function TestFilter

clc
batchresultsfile = 'F:\ResultsViewer\batchresults.txt ';
curdir = fileparts(batchresultsfile);

Matrix = load(batchresultsfile);

%Table 
year = 2006;
transectIDs = [3300 3775 6625 8175 8700 9975 10623];
probability = [0.01 0.002 0.001 0.00025 0.0001 0.000025 0.00001];
%results  = filterBatchresults(batchresults,1,'value',year,'relop','>',12);

results = getFromMatrixFile(Matrix,1,'value',year,'relop','==',3,transectIDs,1);
%results = getFromMatrixFile(Matrix,1,'value',year,'relop','==',3,3300,17,.01);
return
%for i = 1:length(transectIDs)
%    for j = 1:length(probability)
%        results  =
%        filterBatchresults(batchresults,1,year,3,transectIDs(i),17,probability(j));
%        table(j,i)=results(1,11);
%    end
%end

%Kijkduin
name = 'Kijkduin';
disp(['Processing ' name ' ...'])
year = 2006;
areacode = 9;
transectIDs = [10547 10567 10592 10623 10653 10683];
probability = [0.00001 0.000025 0.0001 0.00025 0.001 0.002 0.01];
for i = 1 : length(probability)
    filename = [name ' ' num2str(year) ' - ' strrep(num2str(probability(i)),'.','_')];
    clear results
    results  = filterBatchresults(batchresults,1,year,2,areacode,3,transectIDs,17,probability(i));
    writeResults(results,[curdir filesep filename],1) % 1: points, 2: lines
    writeResults(results,[curdir filesep filename],2) % 1: points, 2: lines
end
