Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using MATLAB Homework 4- Logicals and Masking Homework 4 - Logicals and Masking Function Name: gameMap Example: greenH11 Zone- Inputs: (char) an MxN character
Using MATLAB
Homework 4- Logicals and Masking Homework 4 - Logicals and Masking Function Name: gameMap Example: greenH11 Zone- " Inputs: (char) an MxN character array representing a game map 2. 1. (char) a single character that represents a player character 3. (doubie) A 1xP vector af rows to be destroyed Outputs: eG 1. (char) an (M-P)xN character array representing the updated map 2. (double) The number of players present on the updated game map 1- Background: You and your friends are playing the newest Super Smash Bros. game, MATLAB edition! Unfortunately, the new game features a mode where certain parts of the map are destroyed by laser beams shooting across the stage. You need to use your amazing MATLAB skills to find out how many brawlers are left after the deletions sweop the map [neuMap, players]-ganeMap(greenHil1zone, [1 2 4 8]) Function Description: newMap You are given a character array representing the map. First, account for the lasen beams by deleting the row (or rows) given by the third input. Second, find how many 'players remain on the map. Each player is represented by the character given as the second input to the function. Finally, output the updated array, and the nurmber of players on the map 8 players- 3 Hints: . How wauld you find the number of times a certain character appears in a character 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