Question: How would I use if statements to solve this? This is using Matlab Suppose you are responsible for calculating employee salaries for the coming year

 How would I use if statements to solve this? This is

How would I use if statements to solve this?

This is using Matlab

Suppose you are responsible for calculating employee salaries for the coming year based on their performance rating for this year. You wish to build a function that will automatically calculate the employee's new salary (NewSalary) given their current salary (E_salary) and their performance rating (E_performance). Raises for the next year will be handed out on the following basis: A rating of 8 or above will result in a raise of 5% --> A rating of 5-7 will result in a raise of 3%. A rating of 4 or below will result in no raise. (New Salary = Current Salary*1.05) (New Salary = Current Salary*1.03) (New Salary = Current Salary) --> Write a function BonusCalculator that will: 1. Take 2 inputs: E_salary and E_performance 2. Output the new employee salary called: New Salary Function C Reset 9 MATLAB Documentation 1 function [NewSalary] - BonusCalculator (E_salary, E_performance) 2 % Enter your function code here 3 4 end 5 Code to call your function C Reset 1 [NewSalary1] = BonusCalculator (4230,10) %Testing your function 2 3 [NewSalary2] = BonusCalculator (4230,5) %Testing your function 4 5 [NewSalary3] = BonusCalculator (4230,3) %Testing your function

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!