4字符串单元数组及结构.docxVIP

  • 3
  • 0
  • 约1.17万字
  • 约 11页
  • 2017-06-13 发布于湖北
  • 举报
str=my name is Li mingstr =my name is Li mingwhos Name Size Bytes Class Attributesans 1x2 16 double str 1x18 36 char ischar(str)ans = 1ischar(ans)ans = 0disp(str)my name is Li mingstr(5)ans =astr2=your name;strcat(str,str2)ans =my name is Li mingyour namestr1=Im china;str2=Im sixteen;b=strncmp(str1,str2,3)b = 1helpstrcmp STRCMP Compare strings. TF = STRCMP(S1,S2) compares the strings S1 and S2 and returns logical 1 (true) if they are identical, and returns logical 0 (false) otherwise.

文档评论(0)

1亿VIP精品文档

相关文档