Question: Matlab Question: See Restrictions Below Are the letters consecutive? Write a Boolean function isConsecutive that looks at a string and then determine if the letters
Matlab Question: See Restrictions Below



Are the letters consecutive? Write a Boolean function isConsecutive that looks at a string and then determine if the letters are occurring consecutively in the string. The function also determine the number of characters in the string, and the number of letters. Restrictions: The function should use the internal function isletter. The input string could be any length. Hint: This problem can use the break statement. For example [consecutiveLetters, numberCharacters, numberLetters] isConsecutive(string) >> string-'123', string = = 123 consecutiveetters = logical numberCharacters numberLetters = [consecutiveLetters, numberCharacters, numberLetters] = 1sConsecutive(string) >> string-'Josh2a. string = "Josh2a consecutiveetters = logical 1 numberCharacters 6 numberLetters = [consecutve Letters, numberCharacters, numberLetters] = sConsecutive(string) >> string-, 3rd.. string = Brd. consecutiveetters = logical 1 numberCharacters 4 numberLetters = 2 This function will be used in subsequent homeworks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
