function [lim_95] = lim95( array )
%[lim_lower02, lim_upper95] = lim95( array )
%   This function sorts the array and finds the limits after ignoring the
%   top 5% of data.

array = sort(array(~isnan(array)));
n = length(array);

i1 = round(1); % Lower index limit for colorbar
i2 = round(n*0.95);

lim_95(1) = array(i1); % Lower z limit for colorbar
lim_95(2) = array(i2); % Upper z limit for colorbar

end

