You need to specify that you want the result as a char array:
str=input('enter the string>>','s');
It is also a good idea to develop the habit of avoiding builtin Matlab names.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!