MATLAB: How to split a word to parts

chardisplayfunction

Hi all, Well I want to split a word into parts for example I have sentence a='Hello World', and I want to b='llo', How can I do such thing?

Best Answer

thres = 3; %three last character of first word
a = 'Hello World';
b = strtok(a);
b = b(end-(thres-1):end);