Question: I need some help with this... ****Coding Language: MATLAB**** Function Name: escapeTeamRocket Inputs: 1. (char) An NxM array of the current map 2. (char) A

I need some help with this... ****Coding Language: MATLAB****

I need some help with this... ****Coding Language: MATLAB**** Function Name: escapeTeamRocket

Function Name: escapeTeamRocket Inputs: 1. (char) An NxM array of the current map 2. (char) A character representing the initial direction of motion Outputs: 1. (char) An NxM array of the final coursed map Topics: (conditionals), (iteration) Background: After playing a few arcade games at the Rocket Game Comer in Celadon city, you stumble upon a mysterious button behind a poster, giving you access to Team Rocket's Hideout! Since you only brought Magikarp along with you, the Team Rocket grunts easily defeat you and throw you into one of their mazes! After trying to hours to escape, you resort to your trusty sidekick MATLAB (obviously programmed into your PokWatch) to help you get out of this mess! Function Description: In this problem, you will be given an NxM character array map of the different tiles in the maze you need to escape along with an initial direction. In this map, you will initially be given up to 7 different characters: 'o' represents your initial position 'X' represents where your final position should be '','','v', and '' represent tiles that will change your direction of motion o > directs you right o '> map = ['>.>X.'; '..v.o'; >> dir - '1'; >> key - escapeTeamRocket (map, dir); key - ['###X.'; '#.###'; #v#. directs you right o '> map = ['>.>X.'; '..v.o'; >> dir - '1'; >> key - escapeTeamRocket (map, dir); key - ['###X.'; '#.###'; #v#.

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!