I am trying to shift each letter of a given word by two positions.
alphab='abcdefghijklmnopqrstwxyz'inStr = 'doug';rot=2b=''for i=1:length(inStr) a = find(inStr(i)==alphab) a = (inStr(i)+rot) if abs(a)>26 a = rem(a,26); end A = alphab(a) b = strcat(b,A);end
Best Answer