Question: Function Name: fallingIntoThemDMs nputs: 1. (char) An encoded character vector ending in a space and a number Outputs: 1. (char) The decoded message Background Fall

 Function Name: fallingIntoThemDMs nputs: 1. (char) An encoded character vector ending

Function Name: fallingIntoThemDMs nputs: 1. (char) An encoded character vector ending in a space and a number Outputs: 1. (char) The decoded message Background Fall is in the air. The leaves are changing colors, the temperature is dropping, Yellow Jacket fans are packing into Bobby Dodd, and you just so happen to be taking CS 1371 at the same time as your crush. Now, in a surprise turn of events, your crush has fallen into your DMs- in the middle of class! However, they sent you a secret code that you will have to use your MATLAB skills to decipher. Function Description: The message will consist of a string of ASCII characters followed by a space, then a number. To reveal the message, you must get the number from the end of the string and add its value to each of the other characters in the string. In essence, you are manipulating the ASCII values and therefore changing the string to reveal the message! Example: Given B_ffi 6', your function should output Hello Notes: There will only be 1 space in the input string The number at the end can be any number of digits Make sure to remove the space and number from your output Hints: The strtok and str2num functions may be useful Don't forget about casting

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!