Question

A certain company offers seven annual salary levels (dollars): 12,000, 15,000, 18,000, 24,000, 35,000, 50,000, and...

A certain company offers seven annual salary levels (dollars): 12,000, 15,000, 18,000, 24,000, 35,000, 50,000, and 70,000. The number of employees paid at each level are, respectively: 3000, 2500, 1500, 1000, 400, 100, and 25. Write some statements at the command line to find the following: (a) The average salary level. Use mean. (Answer: 32,000) (b) The number of employees above and below this average salary level. Use logical vectors to find which salary levels are above and below the average level. Multiply these logical vectors element by element with the employee vector, and sum the result. (Answer: 525 above, 8000 below) (c) The average salary earned by an individual in the company (i.e., the total annual salary bill divided by the total number of employees). (Answer: 17,038.12)

Homework Answers

Answer #1

SOLUTION -

code -

clc
clear all

SL = [12000 15000 18000 24000 35000 50000 70000 ];
NE = [3000 2500 1500 1000 400 100 25 ];

%%(a)
avg_SL = mean(SL);
fprintf('Average salary level =$ %g\n',avg_SL);

%%(b)
% above average salary level
LV = (SL>avg_SL); % logical vector above average salary level
NE_a = sum(NE.*LV); % no of employees above average salary level
fprintf('NO of employees above average salary level = %i\n',NE_a);
% below average salary level
LV = (SL<avg_SL); % logical vector above average salary level
NE_b = sum(NE.*LV); % no of employees below average salary level
fprintf('NO of employees below average salary level = %i\n',NE_b);

%%(c)
AvgSal = sum(SL.*NE)/sum(NE);
fprintf('Average salary earned by an individual =$ %g\n',AvgSal);

SCREENSHOT-

IF YOU HAVE ANY DOUBT PLEASE COMMENT DOWN BELOW I WILL SOLVE IT FOR YOU:)
----------------PLEASE RATE THE ANSWER-----------THANK YOU!!!!!!!!----------

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Team 5 answer the questions What are 4 key things you learned about the topic from...
Team 5 answer the questions What are 4 key things you learned about the topic from reading their paper? How does the topic relate to you and your current or past job? Critique the paper in terms of the organization and quality. Incentive Systems             In this paper, we will focus primarily on financial rewards that companies use to attract, retain and motivate the brightest and most talented candidates in the labor market. By providing a reward system that...
What tools could AA leaders have used to increase their awareness of internal and external issues?...
What tools could AA leaders have used to increase their awareness of internal and external issues? ???ALASKA AIRLINES: NAVIGATING CHANGE In the autumn of 2007, Alaska Airlines executives adjourned at the end of a long and stressful day in the midst of a multi-day strategic planning session. Most headed outside to relax, unwind and enjoy a bonfire on the shore of Semiahmoo Spit, outside the meeting venue in Blaine, a seaport town in northwest Washington state. Meanwhile, several members of...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how the firms resources incompetencies support the given pressures regarding costs and local responsiveness. Describe entry modes have they usually used, and whether they are appropriate for the given strategy. Any key issues in their global strategy? casestudy: Atlanta, June 17, 2014. Sea of Delta employees and their families swarmed between food trucks, amusement park booths, and entertainment venues that were scattered throughout what would...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT