Question: Please solve using Matlab. Please do not use Conditional Statements or Iterations !!! Function Name: unscrambledEggs Inputs: 1. (double) 1XN vector of the order in

Please solve using Matlab. Please do not use Conditional Statements or Iterations!!!Function Name: unscrambledEggs Inputs: 1. (double) 1XN vector of the order inPlease solve using Matlab. Please do not use Conditional Statements or Iterations!!!

Function Name: unscrambledEggs Inputs: 1. (double) 1XN vector of the order in which to unscramble the recipe 2. (char) 1X(2N) vector representing the scrambled recipe Outputs: 1. (char) 1X(2N) vector representing the unscrambled recipe Topics: (LHS/RHS indexing) Background: You've been MATLABing all day, and man, are you hungry. You're feeling breakfast for dinner, so you turn to your trusty cookbook to find the recipe for your favorite breakfast meal: scrambled eggs! But it looks like you're out of luck! Your roommate pranked you and replaced your cookbook with another. All the words on the recipe are jumbled, but they seem to follow a pattern. With your stomach growling, you turn to MATLAB for a quick save so you don't die of hunger tonight Function Description: Given a character vector that represents your cookbook recipe, use the double vector to unscramble your recipe. The double vector represents a pattern that will unjumble the characters and arrange them in the correct order. However, the pattern given is only half of the length of the entire recipe. In order to successfully unjumble the recipe, you must apply the pattern to the character vector twice: once to the first half, and once to the second half. After unscrambling, output the corrected recipe. Example: pattern scrambled [7, 4, 1, 3, 10, 13, 12, 8, 11, 5, 9, 2, 6] 'w OKSHMeTa oagmr.scdgb el' = unscrambled unscrambled unscrambledEggs (pattern, scrambled) 'How To Make Scrambled Eggs' Notes: The character vector will always be exactly twice the length of the pattern. The same pattern must be applied to the first and second half of the recipe. 0 Hints: Think about how you might split the recipe in half to make it easier to apply the pattern. Function Name: unscrambledEggs Inputs: 1. (double) 1XN vector of the order in which to unscramble the recipe 2. (char) 1X(2N) vector representing the scrambled recipe Outputs: 1. (char) 1X(2N) vector representing the unscrambled recipe Topics: (LHS/RHS indexing) Background: You've been MATLABing all day, and man, are you hungry. You're feeling breakfast for dinner, so you turn to your trusty cookbook to find the recipe for your favorite breakfast meal: scrambled eggs! But it looks like you're out of luck! Your roommate pranked you and replaced your cookbook with another. All the words on the recipe are jumbled, but they seem to follow a pattern. With your stomach growling, you turn to MATLAB for a quick save so you don't die of hunger tonight Function Description: Given a character vector that represents your cookbook recipe, use the double vector to unscramble your recipe. The double vector represents a pattern that will unjumble the characters and arrange them in the correct order. However, the pattern given is only half of the length of the entire recipe. In order to successfully unjumble the recipe, you must apply the pattern to the character vector twice: once to the first half, and once to the second half. After unscrambling, output the corrected recipe. Example: pattern scrambled [7, 4, 1, 3, 10, 13, 12, 8, 11, 5, 9, 2, 6] 'w OKSHMeTa oagmr.scdgb el' = unscrambled unscrambled unscrambledEggs (pattern, scrambled) 'How To Make Scrambled Eggs' Notes: The character vector will always be exactly twice the length of the pattern. The same pattern must be applied to the first and second half of the recipe. 0 Hints: Think about how you might split the recipe in half to make it easier to apply the pattern

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!