Strcat function - Concatenation:
The strcat function, though, will eliminate the trailing blanks from strings before concatenating. Note that in these illustrations, the trailing blanks from str1 are eliminated, while the leading blanks from str2 are not:
>> strcat(str1,str2)
ans =
xxx yyy
>> length(ans)
ans =
9
>> strcat(str2,str1)
ans =
yyyxxx
>> length(ans)
ans =
9