Question: Secret Code Some secret agents have created a new code language with the following rules: If the word in English begins with a y ,
Secret Code
Some secret agents have created a new code language with the following rules:
If the word in English begins with a y move the to the end of the word and add ay to the end of it
If the word begins with a b c d or e add "pow" to the end of the word
If the word begins with any other letter, add ee to the end of the word.
Examples:
yo this code is so cool oyay thisee codepow isee soee coolpow
yaks are my favorite animal aksyay arepow myee favoriteee animalpow
Write a MATLAB function that will take as input a phrase that is a string of unknown length and return the phrase translated into the secret language as a vector of
strings.
Function
Code to call your function
outphrase myFunctioninphrase
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
