function [qrr_unique, drr_unique] = sort_out_samples(rr, drr, qLevels)

%function [rr_unique, drr_unique] = sort_out_samples(rr, drr, qLevels)

% ************
% NEEDS: sort_out_samples_double.dll (or mex) generated from
% sort_out_samples_double.c
% ***********

qrr = (round(rr * qLevels))/qLevels;

%qrr(:,1) = (round(rr(:,1) * 5*qLevels))/5/qLevels;

[qrr_sorted, I2] = sortrows(qrr);

drr_sorted = drr(I2,:);



[qrr_unique, drr_unique, ix_unique] = sort_out_samples_double(double(qrr_sorted), double(drr_sorted));



%I = find(sum(drr_unique,2));



%qrr_unique = qrr_unique(I,:);

%drr_unique = drr_unique(I,:);



