Question: MATLAB Are the letters consecutive? Write a Boolean function isConsecutive that looks at a string and then determine if the letters are occurring consecutively in
MATLAB
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, numberLetters] -isConsecutive ( string) >> string= .123., string = numberCharacters, 123 consecutiveLetters- logical numberCharacters = numberLetters >> strings . Josh2a. [consecutiveLet ters, numberCharacters, numberLetters] isConsecutive ( string) = string = Josh2a consecutiveLetters- logical numberCharacters = numberLetters >> string= '3rd.. [consecutiveLetters, numberCharacters, numberLetters] isconsecutive ( string) = string = 3rd. consecutiveLetters- logical numberCharacters = numberLetters 4 [consecutiveLetters, numberLetters] -isConsecutive ( string) >> string= .123., string = numberCharacters, 123 consecutiveLetters- logical numberCharacters = numberLetters >> strings . Josh2a. [consecutiveLet ters, numberCharacters, numberLetters] isConsecutive ( string) = string = Josh2a consecutiveLetters- logical numberCharacters = numberLetters >> string= '3rd.. [consecutiveLetters, numberCharacters, numberLetters] isconsecutive ( string) = string = 3rd. consecutiveLetters- logical numberCharacters = numberLetters 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
