home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / STRFUN.DI$ / STRCMP.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  342 b   |  16 lines

  1. function c = strcmp(s1,s2)
  2. %STRCMP    String comparison.
  3. %    STRCMP(S1,S2) returns 1 if strings S1
  4. %    and S2 are the same and 0 otherwise.
  5. %    See also FINDSTR.
  6.  
  7. %    J.N. Little 10-5-87, JRG 7-20-91.
  8. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  9.  
  10. c = 0;
  11. if all(size(s1) == size(s2))
  12.     if all(all(s1 == s2))
  13.         c = 1;
  14.     end
  15. end
  16.