Question: solve in MATLAB solve in MATLAb Function Name: bossFinder Inputs: 1. (char) A MxN character array of names Outputs: 1. (char) The name of the
Function Name: bossFinder Inputs: 1. (char) A MxN character array of names Outputs: 1. (char) The name of the boss Topics: (arrays), (indexing) Background: It's time... You have been working like crazy and feel confident that you deserve a promotion. The one issue is that your company never actually told you who the boss is. However, luckily the CEO Blake is a huge MATLAB fan so he always would choose bosses by who had the best name in terms of the ascii value. You now know what you must do, and you pull up MATLAB to go get that promotion Function Description: Given a character array of names of all the higher ups in the company, you must find who the boss is. The CEO determines the best name based on which names have the highest sum of their corresponding ascii values. You must calculate this value for the names and then index out the name of your boss. Example: array - ['emma'; john'; 'jack'; 'jane'; fred'] boss = bossFinder (array) boss john' Notes: The name must be outputted exactly how it appears in the array Each of the names within the array will always be the same length Notes: The second input of the sum() function may help here intRates = [ 7.5 12.5 50 5: 16.6 10 14 4; 40 5 0 2] time = (5 10 1 30; 5 10 15 20; 3 30 010) goal = 10,000 (expIntQuarterly. intRates, bankstatement) number Worker (loans, time, goal) expIntQuarterly = [2221, 54500, 10760, 94900) bankStatement = "The bank reached their goal 3 quarters out of the year. The total expected profit is $162381.50. Notes: Interest rates are given in percent form, so you must convert to a decimal before plugging in the formula When displaying your yearly output in the sentence, ensure it is not in scientific notation and only 2 values are displayed after the decimal. (ex. $162381.50 rather than $162381.50 or 1.6238e+05) The yearly profit MUST be displayed as it is in the example, do not display in scientific notation or with any more than 2 decimal places. Your first output will likely display in scientific notation, this is okay. Remember, P = principal amount, r = interest rate, t = time (in years). I = interest Make sure to calculate the yearly total by summing the rounded quarterly totals. . Hints: If your string output looks off, remember that %d is not always the right choice for numeric values in the sprintf() function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
