Question: matlab Function Name: ghostBusters Inputs: 1. (struct) A 1x1 structure representing the containment unit Outputs: 1. (double) The number of ghosts you freed Background: ghosts

matlab Function Name: ghostBusters Inputs: 1. (struct) A 1x1 structure representing thematlab

Function Name: ghostBusters Inputs: 1. (struct) A 1x1 structure representing the containment unit Outputs: 1. (double) The number of ghosts you freed Background: ghosts across the city. You have broken into their headquarters and have reached the For years you have been trying stop the Ghostbusters and their unjust entrapment of containment unit. It's finally your chance to set all of the ghosts free! Function Description: Write a function that frees all of the ghosts in the containment unit! Ghosts are stored at different levels within the containment unit to prevent them from helping each other escape. All of the levels are stored as nested structures, with the next level to check stored in the field nextLevel. The status of each level is stored in the field ghost, which is true if there is a ghost in that level of the containment unit. You must count the number of ghosts you are able to free from the unit, and output the number. Example: Level 1 Leve12 Leve13- ghost: true nextLevel: Level2 ghost: false nextLevel: Level3 ghost: true nextLevel: [] >freed-ghostBusters (Level1) out 2 Notes: The nextLevel field of the last structure will be empty Function Name: ghostBusters Inputs: 1. (struct) A 1x1 structure representing the containment unit Outputs: 1. (double) The number of ghosts you freed Background: ghosts across the city. You have broken into their headquarters and have reached the For years you have been trying stop the Ghostbusters and their unjust entrapment of containment unit. It's finally your chance to set all of the ghosts free! Function Description: Write a function that frees all of the ghosts in the containment unit! Ghosts are stored at different levels within the containment unit to prevent them from helping each other escape. All of the levels are stored as nested structures, with the next level to check stored in the field nextLevel. The status of each level is stored in the field ghost, which is true if there is a ghost in that level of the containment unit. You must count the number of ghosts you are able to free from the unit, and output the number. Example: Level 1 Leve12 Leve13- ghost: true nextLevel: Level2 ghost: false nextLevel: Level3 ghost: true nextLevel: [] >freed-ghostBusters (Level1) out 2 Notes: The nextLevel field of the last structure will be empty

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!