%sample code to be translated into IDL
%find number of indpendent values in a given array.  That is, find the
%number of actual unique elements in an array, excluding duplicate values,
%whereever they may be in an array.  Example: if an array is 1, 2, 2, 3, 4,
%5, there are a total of 6 elements in that array, but there are only 5
%unique values (since one of them, the two, is a duplicate).  We want our
%code to take an array like the one listed above and output the number 5.

%ended up being unnecessary thanks to IDL's "uniq" function.  MATLAB also
%has a function called "unique".


array = DV(1,1).a_series(1,1).profile

array = [array; 30.31; 31.7; 49.7; 72.9]

count = 0;
for i =1:length(array);
    test_indices = 
    for j = 1:length(array);
        if array(i) == array(j)
            count = count + 1;
        else 
        end
    end
end