IN MATLAB:
In this exercise, we will work with two string related functions lower and upper. Use the help command to learn the basic usage of the two functions. Then develop a script to convert an input word to a specific format. For example, if the user entered \'o’conner\', \'OCONNOR\', or \'oconner\', the script will generate \'OConnor\' for all those input words. Focus on applying the two functions and array element access to form the statements.
Solution
stringToConvert = input(\'Please enter string to covert to special format: \', \'s\');
outputString = [upper(stringToConvert(1:2)) lower(stringToConvert(3:end))];
display(outputString);
OUTPUT:
Please enter string to covert to special format: sameer
outputString = SAmeer
.