Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please no fors if elses whiles any loops/Iterations/Conditionals MATLAB ------------------------------------------------------------------------------------------------- Function: topSales Input: 1. (double) Nx4 array of representing sales data 2. (char) NxK array
Please no fors if elses whiles any loops/Iterations/Conditionals MATLAB
-------------------------------------------------------------------------------------------------
Function: topSales Input: 1. (double) Nx4 array of representing sales data 2. (char) NxK array containg the first K letters of each sales rep's name Output: 1. (char) MxK array containg the name of each sales rep who sold more than the annual sales average 2. (double) (N+1)5 array of sales data with totals appended 3. (double) Average sales Function Description: - Your first task is to add a column to the right of the sales array that contains the sum of the sales data from the four quarters. - Your third task is to calculate the average number of sales made by all of the sales reps and use that to determine which sales reps sold more than this average. - Your fourth task is to return the names of the sales reps (in the same order as they appear in the second input) who sold more than the calculated average - Your fifth task is to return the sales array with the additional column and row. - Your sixth task is to return the sales average that you calculated Note(s): - You are guaranteed that the sales data array will have four columns of data - You are guaranteed that each name will be the same length - You are guaranteed that the given arrays will have at least two rows of data - The name on each row of the second input corresponds to the data on each row of the first input. ExamplesStep 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