Artifact feff63e1102aefe826d31a06ab99b9b86a7d85ef9699de4fbc1fce389b2766f9:
- Executable file mttroot/mtt/bin/trans/m/unique.m — part of check-in [faa9280a46] at 1997-09-18 19:38:58 on branch origin/master — Initial revision (user: gawthrop@users.sourceforge.net, size: 460) [annotate] [blame] [check-ins using]
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;