The problems this week involved compound interest while ther

The problems this week involved compound interest while there is simple formula for determining the amount of money in an account after given number of periods and given interest rates you do not need the formula(and should not use it) for this problems as the focus of the assignments is loop structures in matlab. rather use loop structures and increase the amount in the account by a factor of 1 + the interest rate each time through the loop for example if the annual rate is 5% and interest is paid annually. then amount in the account is multiplied by 1.05 every time through the loop and every pass through the loop. represents 1 year. Suppose that you deposit $10,000 in an account that pays 5% interest per year. Write a MATLAB file to calculate the account balance after a given number of years. Your program should prompt the user to input the number of years. Write the MATLAB program steps here (although your program should contain comment lines, it is not necessary to write those lines here): What is the value of the account after 10 years? after 30 years?

Solution

Principal_amount=10000;

annual_rate=5;

years=input(prompt);


Future_value=Principal_amount*(1+annual_rate./100).^(years);

 The problems this week involved compound interest while there is simple formula for determining the amount of money in an account after given number of periods

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site