Question: I posted this question and got an answer back then copy and pasted the code and it just doesn't work properly. Please fix it for

 I posted this question and got an answer back then copy

and pasted the code and it just doesn't work properly. Please fix

it for Matlab grader. The grader requires some special requirements that are

shown in the question and pictures. THANKS function accumulated_amount = amount(savings, frequency,

I posted this question and got an answer back then copy and pasted the code and it just doesn't work properly. Please fix it for Matlab grader. The grader requires some special requirements that are shown in the question and pictures. THANKS

function accumulated_amount = amount(savings, frequency, rate) \%o convert annual rate to a proportion rate = rate /100; \% Determine the number of compounding periods and the periodic rate switch frequency case 'monthly' periods =12; case 'quarterly' periods =4; case 'semiannually' periods =2; case 'annually" periods =1; otherwise error ("Invalid compounding frequency. Choose from "monthly", "quarterly", "semiannually", "annually". "); end \% calculate the accumulated amount accumulated_amount = savings * (1+ rate / periods ) periods; end Code to call your function ? 1 accumulated_amount =amount(1000, "monthly', 5); Switch Structure for Interest Accrual 13 solutions submitted (max: Unlimited) | View my solutions Use the switch structure to write a function to compute the amount of money that accumulates in a savings account in one year. The function inputs are the initial amount, the 'semiannually', 'annually'), and the interest rate as a percentage. The switch structure should calculate the amount accumulated based on switching between the frequency o are the initial amount, the frequency of interest compounding (options are: 'monthly', 'quarterly', between the frequency of interest compounding, with the options listed

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!