Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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:

  1. (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:

  1. Find the number of Dodo nests in the cave.
  2. Determine the total number of Dodo eggs in the cave. The second inputs egg numbers have corresponding nest types from the first input.
  3. 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!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Design Operation And Evaluation Of Mobile Communications

Authors: Gavriel Salvendy ,June Wei

1st Edition

3030770249, 978-3030770242

More Books

Students also viewed these Programming questions