Artifact feff63e1102aefe826d31a06ab99b9b86a7d85ef9699de4fbc1fce389b2766f9:


function u = unique(x);
% if all the elements of x are different, returns 1 else returns 0


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


n = length(x);
u=1;

for i=1:n
  for j = 1:i-1
    if x(i)==x(j)
      u = 0;
      break;
    end;
  end;
end;

    

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]