Initial commit
This commit is contained in:
18
string_learning.m
Normal file
18
string_learning.m
Normal file
@@ -0,0 +1,18 @@
|
||||
% str1 = 'I like matlab,';
|
||||
% str2 = 'JavaScript, and Perl!';
|
||||
% str3 = [str1 str2];
|
||||
% disp(str3)
|
||||
|
||||
% ansi编码
|
||||
% str1 = 'abcdefgh';
|
||||
% str2 = upper(str1);
|
||||
% str3 = lower(str2);
|
||||
% double(str1)
|
||||
% double(str2)
|
||||
|
||||
% 比较
|
||||
str1 = 'today';
|
||||
str2 = 'tomorrow';
|
||||
str3 = 'today';
|
||||
out1 = strcmp(str1,str2)
|
||||
out2 = strcmp(str1,str3)
|
||||
Reference in New Issue
Block a user