Function Name: theLastDodoEgg inputs: 1. (char) 1x5*N character vector of 'Bird' and 'Dodo' 2. (double) 1xN vector
Question:
Function Name: theLastDodoEgg
inputs:
1. (char) 1x5*N character vector of 'Bird' and 'Dodo'
2. (double) 1xN vector of eggs ( the type of egg corresponding to the first input) in each nest
Outputs:
- (char) A description of your findings
Topics: (vectors), (masking), (concentration)
Banned Functions:
strfind()
Background:
As a paleontologist, you are desperate to uncover the fossil of the Dodo bird. Dusting away at a site in Madagascar, you come upon an amazing discovery! You unearth a cave, filled with the thought-to-be extinct species of some birds. There are even nests with eggs! You must gather all the Dodo eggs in the cave to take back to your lab- immediately! Lucky for you, your assistant, MATLAB, knows just how to help.
Function Description:
You are given a character vector consisting of the words Bird and Dodo with each word separated by a space. Each word of this vector corresponds to a nest.
Perform the following operations:
- Find the number of Dodo nests in the cave.
- Determine the total number of Dodo eggs in the cave. The second inputs egg numbers have corresponding nest types from the first input.
- Form your output statement by following the template below with descriptions denoted by filled in by your code.
There are Dodo nests(s) and Dodo eggs(s) in total!