Question: Using Matlab 1) Write a function stringManip that takes in a character string and returns a character string following these rules: a) any vowel (a,
1) Write a function stringManip that takes in a character string and returns a character string following these rules: a) any vowel (a, e, i, o, u) is replaced by the character '&' b) any numeric character has 1 added to it (if it was 9, it becomes 0 instead) (str2num() is useful here) c) all lowercase characters become uppercase (use the upper() function) d) replace the final character with '! e) append the length of the string before this step to the end (num2str() is useful here) The built-in Matlab functions upper() and lower() can be useful. Test strings: a) 'thisisatest b) 'This is a test. c) '5 plus 3 is 8? Example: >>stringManip('What Do You Get When You Multiply 6 By 9) ans WH&T D& Y&&G&T WH&N Y&&M<&PLY 7 BY 0141
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
