home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l455 / 7.ddi / ROBUST.DI$ / ISSAME.M < prev    next >
Encoding:
Text File  |  1993-03-11  |  684 b   |  24 lines

  1. function i = issame(x,y)
  2.  
  3. % I = ISSAME(X,Y) tests whether the values of the variables X and Y are the
  4. %     same.  For arbitrary matrices X and Y, ISSAME(X,Y) returns 1 if X and Y
  5. %     are equal or it returns 2 if, additionally, ISSTR(X)==ISSTR(Y);
  6. %     otherwise it returns 0.
  7. %
  8.  
  9. % R. Y. Chiang & M. G. Safonov 10/25/90    
  10. % Copyright (c) 1990 by the MathWorks, Inc.
  11. % All Rights Reserved.
  12. % ---------------------------------------------------------------------------
  13.  
  14. i=0;
  15. if min(size(x)==size(y)),
  16.    if x==y,
  17.        i=1;
  18.        if isstr(x)==isstr(y),
  19.           i=2;
  20.        end
  21.    end
  22. end
  23.  
  24. % ------------- End of ISSAME.M ------------------RYC/MGS 10/25/90 %