Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose you wanted to apply the conditional statements built in problem 1 to large data sets for salary ( Current _ salaries ) & performances

Suppose you wanted to apply the conditional statements built in problem 1 to large data sets for salary (Current_salaries) & performances (E_performances). You have chosen to do this by including your conditional statements iteratively inside of a for loop.
Modify the script below so that it will perform this iterative operation, and store the values inside a new 1x6 vector named New_salaries.
Remember: 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%.-->(New Salary = Current Salary*1.05)
A rating of 5-7 will result in a raise of 3%.-->(New Salary = Current Salary*1.03)
A rating of 4 or below will result in no raise. -->(New Salary = Current Salary)Current_salaries =[450005000063250380005250074000];
E_performances =[943856];
New_salaries = zeros(1,length(Current_salaries)); % This step will save on computing power for longer for loops. You should get into the habit of doing this step.
for i=??% Complete this line by replacing the ??'s with the appropriate code.
% iterative conditional statements go here
end
New_salaries

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions