Question: Solve the following problem using MATLAB : Thanks to your wonderful cash-register software, Kwik-E-Mart is expanding! They now have 100 employees and the company is

Solve the following problem using MATLAB:

Thanks to your wonderful cash-register software, Kwik-E-Mart is expanding! They now have 100 employees and the company is looking to expand. But Kiwk-E-Mart Corporate needs help with their payroll system. The current system gives Kwik-E-Mart a single array with employees worked hours and payrate. The payroll officer cannot calculate paycheck amount by hand, so he has enlisted your help. The current system gives the payroll officer the following:

For exmaple: Kwik_Emp_Pay = [hours1, pay1, hours2, pay2, hours3, pay3, .. hoursN, payN]

Use the data below to solve the problem:

Kwik_Emp_Pay = [41.250, 18.40, 20.50, 20.50, 40, 20.40, 46.750, 19.90, 35.750, 16.40, 32.250, 19.40, 23.50, 18.50, 41.750,18.50, 28.5, 19.70, 28.750,17..20, 42.7500000000000,17.8000000000000,55.2500000000000,19.3000000000000,23.2500000000000,20,36.5000000000000,20.2000000000000,41.2500000000000,19.9000000000000,36.2500000000000,16.4000000000000,47,17.1000000000000,27.5000000000000,17.8000000000000,48.2500000000000,20,40,21.1000000000000,36.2500000000000,18.3000000000000,20.7500000000000,17.5000000000000,31.5000000000000,19.8000000000000,38.7500000000000,19,32.2500000000000,19,34.2500000000000,20.6000000000000,38.7500000000000,18.5000000000000,35.2500000000000,18.5000000000000,37.2500000000000,19.7000000000000,39.7500000000000,19.8000000000000,37.2500000000000,18.8000000000000,36.5000000000000,16.4000000000000,46,20,30,18.8000000000000,25.7500000000000,18.3000000000000,29.7500000000000,18.7000000000000,30.2500000000000,17.9000000000000,51,17.1000000000000,22.7500000000000,18.1000000000000,38,19,37.7500000000000,17.8000000000000,42,18.8000000000000,23.7500000000000,17.9000000000000,51.7500000000000,18.3000000000000,31.2500000000000,17.2000000000000,44.5000000000000,18.8000000000000,25.7500000000000,19.5000000000000,60.2500000000000,17.8000000000000,30.5000000000000,19.5000000000000,19.2500000000000,18.3000000000000,32.7500000000000,19.4000000000000,29,20.7000000000000,50.2500000000000,19.8000000000000,23,20,31.7500000000000,18.7000000000000,48.7500000000000,18.5000000000000,48.2500000000000,18.2000000000000,34.5000000000000,18.6000000000000,41.5000000000000,18.5000000000000,30.2500000000000,16.3000000000000,38.2500000000000,19.7000000000000,49.5000000000000,18.9000000000000,36.7500000000000,19.7000000000000,35.7500000000000,18.6000000000000,33.5000000000000,18.7000000000000,29.2500000000000,18,32,18.9000000000000,29.7500000000000,17.8000000000000,42,18.4000000000000,27,20.3000000000000,33.7500000000000,19,32,19.6000000000000,37.7500000000000,18.5000000000000,30.2500000000000,19.7000000000000,26,18.7000000000000,47.2500000000000,19.8000000000000,43.5000000000000,17.5000000000000,45.7500000000000,19,32.5000000000000,16.6000000000000,41,19.4000000000000,35.2500000000000,17.3000000000000,38.2500000000000,17,30,17.5000000000000,29.7500000000000,17.8000000000000,30.5000000000000,20.2000000000000,30.5000000000000,17.8000000000000,34.2500000000000,17.7000000000000,37.5000000000000,16.8000000000000,34.2500000000000,20,31.7500000000000,19.8000000000000,23.2500000000000,15.4000000000000,58.2500000000000,17,26.7500000000000,20.1000000000000,35.5000000000000,18.8000000000000,42.7500000000000,19.9000000000000,34,18.6000000000000,27.5000000000000,19.7000000000000,36.2500000000000,19,37,19.4000000000000,52,18.6000000000000]

Write a MATLAB script that calculates the total check amount for each employee. You must check if an employee worked more than 40hrs, which indicates that this employee worked over time. For those employees that worked overtime any hours they worked over 40 must be payed at 1.5 times the average hourly pay rate. The script should output:

- The total amount paid by Kwik-E-Mart Corporation in regular pay (hint: use sum() function to get the total amount)

- Total amount paid in overtime

- The grand total paid by the company

- What percentage of the total pay was in overtime pay.

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!