Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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****
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
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