function D = bottleneck(P,Q)
%% measure one dimensional bottleneck distance
if length(P) ~= length(Q)
    display('error : P & Q must be of the same length')
    return
else
    if size(P,1) ~= size(Q,1)
        Q = Q.';
    end
end



P_sort = sort(P,'ascend');
Q_sort = sort(Q,'ascend');

D = max(abs(P_sort-Q_sort));
