MATLAB: String manipulation with printing of characters

fprintfMATLABprintstringstring manipulation

The question is:
Write a script that will prompt the user to enter a word, and then print the first character in the word. For example, the output might look like this:
>> Enter a word: howdy
The word howdy starts with the letter ‘h’
How do you print the first character? I can do the:
>> word = input('Enter a word: ','s')
I do not know to display the first character.

Best Answer

hint
fprintf('%s : ''%s''\n', t, t(1))