Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please solve using Matlab with Masking techniques ! To receive a thumbs up please do not use conditional statements(such as if, then, while, etc) or
Please solve using Matlab with Masking techniques! To receive a thumbs up please do not use conditional statements(such as if, then, while, etc) or iterations(aka loops) on this problem.
Function Name: secretAdmirer Inputs: 1. (char) 1xN string containing an encoded message from your secret admirer 2. (double) 1xN vector representing meaningfulness (on a scale from 1-10) Outputs: 1. (char) Meaningful message from your secret admirer Topics: (masking), (strings and vectors) Background: Is the same person the first to like every Instagram post and to watch your Snapchat story? Do you feel like you bump into them more than you should? Your secret admirer has been waiting for the perfect time to confess their love, and, lucky for them, Valentine's day is coming up. You begin finding notes in your locker (yes, this is definitely a middle school situation), but they don't make sense! This person must be really nervous. Lucky for you, you can decode the messages on MATLAB! Function Description: Obviously, your secret admirer means the wonderful things left in the messages. However, because of their nerves, each message also has additional characters mixed in. You need to find only the characters that were written meaningfully in order to read the real message. You are given a coded message (input 1) and a vector of doubles indicating on a scale of 1-10 how much each corresponding character was meant (input 2). If the character is written with a meaning greater than or equal to 6, then keep the character. Otherwise, do not include it in the final message. Lastly, make the whole message lowercase. Your output should be the meaningful message from your secret admirer. Example: encodedMessage = '!IE Qlivke yaou^' meaningvec = [4 7 3 10 1 9 8 2 8 6 9 7 3 8 6 1] message = secretAdmirer (encodedMessage, meaningvec) message = 'i like you' Notes: The inputs are guaranteed to be the same length. The second input will only contain positive integer values There will not be special characters in the final string. . . Hints: O Start by making a logical vectorStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started