Question: matlab, no conditionals please Function Name: favoriteBand Inputs 1. 2. (double) An array of numbers representing the schedule of performances for the day (double) A

 matlab, no conditionals please Function Name: favoriteBand Inputs 1. 2. (double)matlab, no conditionals please

Function Name: favoriteBand Inputs 1. 2. (double) An array of numbers representing the schedule of performances for the day (double) A 1xM vector of when you are expecting rain Outputs 1. (char) A character vector describing when and where your favorite band is playing 2. (double) An array of numbers representing the updated schedule Background: You've finally made it to Music Midtown, and you are absolutely overwhelmed by the vast number of amazing performances that will be going on all day. How are you going to be able to decide which band is your top priority?? Oh we know, MATLAB! Function Description Based on the schedule input and the expected rain input, you will figure out when and where your favorite band is playing after taking the rain into account. In the first input, the rows represent the order of bands playing (ex: bands playing second are in row 2) and the columns represent the different stages (ex: bands playing on the first stage are in column 1). First, account for the rain by deleting the row (or rows) that corresponds to the act (or acts) during which it will rain. Then, find the stage and order that your favorite band is playing. Your favorite band will have the maximum value in the array. Finally, output a character vector describing when and where they are playing in the following format: "My favorite band is act playing on Stage ! Example: >> schedule[3 7 2; 6 1 9; 11 2 8; 8 5 3] >>rainTime3 >> [fave, sched]favoriteBand(schedule, rainTime) faveMy favorite band is act 2 playing on Stage 3!' sched [3 7 2; 6 1 9; 8 5 3] Notes: There is guaranteed to only be one top band; the greatest number in the array will be unique . . The second input can be either a scalar or a vector. Hints . You may find the second output of max() useful . Use %d with sprintf() for the stage and order numbers

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!