Answered step by step
Verified Expert Solution
Link Copied!

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

-------------------------------------------------------------------------------------------------

image text in transcribedimage text in transcribed

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. Examples

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

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions

Question

4 Name four appraisal methods.

Answered: 1 week ago

Question

7. It is advisable to do favors for people whenever possible.

Answered: 1 week ago