Question: ~~~~~~~~~Posted below is a problem in MATLAB, please answer and provide the correct coding and functions. Thanks!~~~~~~~~~~~~~~ Problem i: Use relational and logical indexing ONLY
~~~~~~~~~Posted below is a problem in MATLAB, please answer and provide the correct coding and functions. Thanks!~~~~~~~~~~~~~~

Problem i: Use relational and logical indexing ONLY for this work The top management of a company is made up of the following staff groupings: Principals, Senior Engineers, Engineers and Technicians. The following are the salary categories of the staff Principals are staff who make at least S135,000, Senior Engineers make at least S 95.000 but not up to S135,000, Engineers make at least $75,000 but not up to $95,000, and Technician make less than S75.000 Write a function called mystaff hat takes one input matrix called S. S is an n-by-m matrix whose elements are the salaries of all staff of the company. Salaries.slsx at the eLC is the data. Your function does not return any value Your function should check for a non-scalar input. It should also check to make sure that the input matrix is not an empty matrix. Use your function to do the following i. Determine the average salary of all Principals in the company ii. Determine the average salary of all Senior Engineers in the company iii. Determine the average salary of all Engineers in the company iv. Determine the average salary of all Technicians in the company v. The company's average salary For part a, use fprintf statements so that your output will look like this when you run the code The Average salary of ni Principals in the company is:SXXXyy The Average salary of n2 Senior Lingincers in the company is:SXXX yy The Average salary of n3 Engineers in the company is: SXXX.yy The Average salary of n4 Engineers in uhc company is:$XXXyy [Note: n n2, n3 and n4 represent number of Principals, Senior Engineers, engineers and technicians respectively in the company. XXX.yy are average salaries. b. Starting July 1, 2017 the company will adjust salaries as follows: Principals will get an adjustment of 12%, Senior Engineers will get 10%, Engineers will get 7.5% and technician will el 6% Use this to determine i. The total yearly salary of all Principals in the company for 2017 ii. The total yearly salary of all Senior Engineers in the company for 2017 iii. The total yearly salary of all the Engineers in the company for 2017 iv. The total yearly salary of all technicians in the company for 2017 The total yearly salary expenditure of the company at the end of the year 2017. Your output for part b should look exactly like this where YY.yy are total 2017 salaries 2017 Salary Summary Principals SYY.yy Senior Engineers SYY.yy Engineers SYY.yy Technicians SYY.yy SSYY.yy TOTAL %96%%%%%% %96%% %96%%%%%%% %%%%%96%%96%%%%%% 9%96%% 696%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
