Question

MATLAB code

Suppose you are a manager in charge of firing and promoting employees. In the interest of fairness, there will be no names at

0 0
Add a comment Improve this question Transcribed image text
Answer #1

code :

Here ,I used sample data . Use your .mat file to get results for 52 entries

Employee. mx 1 load EmployeeData.mat floading EmployeeData.mat file separating into three column vectors 3 EmpNumber = data (

>> data data = 5875511 5875510 5875509 5875508 5875507 5875506 5875505 5875504 5875503 146100 192700 189700 171800 56400 1425

output :

Command Window >> Employee NumPromoted = 4 Numfire = 2 EmpGetting Promoted = 5875511 5875507 5875505 5875504 EmpGettingFired

raw_code :

load EmployeeData.mat %loading EmployeeData.mat file

EmpNumber = data(:,1); %separating into three column vectors
EmpRating = data(:,2);
EmpSalary = data(:,3);

%calculating number of people promoted and Fired
NumPromoted = sum( EmpSalary < 150000 & EmpRating >= 95)
Numfire = sum(EmpSalary > 150000 & EmpRating <= 65)

%columns with employee numbers of promoted and fired
EmpGettingPromoted = EmpNumber(find(EmpSalary < 150000 & EmpRating >=95))
EmpGettingFired = EmpNumber(find(EmpSalary > 150000 & EmpRating <= 65))

Add a comment
Know the answer?
Add Answer to:
MATLAB code Suppose you are a manager in charge of firing and promoting employees. In the...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In header file (.h) and c++ file format (.cpp). A local company has asked you to...

    In header file (.h) and c++ file format (.cpp). A local company has asked you to write a program which creates an Employee class, a vector of Employee class objects, and fills the objects with employee data, creating a "database" of employee information. The program allows the user to repeatedly search for an employee in the vector by entering the employee's ID number and if found, display the employee's data. The Employee_C class should have the following data and in...

  • In the processLineOfData method, write the code to handle case "H" of the switch statement such...

    In the processLineOfData method, write the code to handle case "H" of the switch statement such that: • An HourlyEmployee object is created using the firstName, lastName, rate, and hours local variables. Notice that rate and hours need to be converted from String to double. You may use parseDouble method of the Double class as follows: Double.parseDouble(rate) Call the parsePaychecks method in this class passing the Hourly Employee object created in the previous step and the checks variable. Call the...

  • Amazon to Competition: We Will Crush You! Amazon to Employees: We Will Churn You! Globally, Amazon...

    Amazon to Competition: We Will Crush You! Amazon to Employees: We Will Churn You! Globally, Amazon is one of the largest and most successful companies in any industry. Technological innovation has contributed to its success, as has its employee acquisition practices, which are exceptionally high. The question is what has allowed this company to thrive and maintain its success? This activity is important because it shows how companies like Amazon hire based on personality and individual differences. Such companies place...

  • 1-Suppose you write an application in which one class contains code that keeps track of the...

    1-Suppose you write an application in which one class contains code that keeps track of the state of a board game, a separate class sets up a GUI to display the board, and a CSS is used to control the stylistic details of the GUI (for example, the color of the board.) This is an example of a.Duck Typing b.Separation of Concerns c.Functional Programming d.Polymorphism e.Enumerated Values 2-JUnit assertions should be designed so that they a.Fail (ie, are false) if...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT