2 isSpaceVec=isspace(longName);
3 longName(isSpaceVec)=
'_';
4 isTakenVec=isstrprop(longName,
'upper');
5 isUscrVec=longName==
'_';
6 isDigitVec=isstrprop(longName,
'digit');
7 isTakenVec=(isTakenVec|isDigitVec|[
false,isDigitVec(1:end-1)]|isUscrVec|...
8 [
false,isUscrVec(1:end-1)])&~isSpaceVec;
10 shortName=longName(isTakenVec);
function shortcapstr(in longName)