function Z = diff_values_matrix_mod (X,y)	%function to detect count of different values in the first coloum of a matrix and fill in a Matrix with values
								% X = matrix
								% y = index of coloum
								% Z = Matrix filled with values in correct order

%TEST ENVIRONMENT
%clear all;
%oad data_test;
%X=data_test;
%y=2;
%END TEST ENVIRONMENT

e=size(X,2);
if y>e
  error('Please check 2nd Parameter, the coloum does not exist');
else
  c=1;							% counting variable
  d=X(1,y);							% first value
  b=size(X,1);						% get the number of rows of the data file
  Z(c,1)=d;


  X=sort(X);
  for a=1:1:b
    if ((d+90)*10)==((X(a,y)+90)*10)		% add "90" to get positive float, multiple by "10" to get a integer
								% neccesarry to get positive integers instead of negative floats
      a=a+1;
      else
        c=c+1;
	d=X(a,y);
	Z(c,1)=d;
        a=a+1;
    endif
  endfor
endif