Homework Help Question & Answers
matlab 3. Write a function called MessageDecode that matches an input string scalar to a known…
matlab
3. Write a function called MessageDecode that matches an input string scalar to a known text message abbreviation, and output the unabbreviated form if known. Otherwise, output “Unknown message”. Support the abbreviations: BFF—best friends forever • BTW-by the way • IDK—I don’t know • IMHO—in my humble opinion • LOL—laughing out loud • TMI—too much information Restriction: use switch statement. For example, >> myString=”BFF”; >> MessageDecode (myString) ans- “best friends forever” (Hint: part of the code may like: switch myString case “BFF” out=”best friends forever”;
Add a comment