function [out] = simple2comp1( a )
% 
%   Simple to Composite Sample when observations 
%   are repeated
%   Input:  a - simple sample
%   Output: nx2 matrix: column 1 ordered unique values from a
%                                 column 2: corresponding frequencies
%   Example:
%   a=[  4  5  6  3  4  3  5  4  6  4  3 ...
%        7  7  4  2  2  5  4  2  5  3  8];
%   [out] = simple2comp1( a )
% out =
%      2     3
%      3     4
%      4     6
%      5     4
%      6     2
%      7     2
%      8     1
b = unique(a(:));
out = [b,histc(a(:),b)]
end

