Matlab之字符串处理

1.字符串分割

S = regexp(str, char, 'split')

例子:

S = regexp(fileName, '\.', 'split');

newName = [ S{1} '.txt'];