Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a MATLAB code to solve the following: One bank pays 5.5 percent annual int

ID: 3632587 • Letter: W

Question

Write a MATLAB code to solve the following:
One bank pays 5.5 percent annual interest, while a second bank pays 4.5 percent annual
interest.  Determine how much longer (in years) it will take to accumulate at least $50,000 in the second bank if you deposit $1000 initially, and $1000 at the end of each year.
– Use the following equation to calculate the principle balance due to interest being paid,
p, at the end of each one year period:  p = p*(1+r/100), where r is the interest rate  
– Use two while loops in your code

Explanation / Answer

clear;clc first_bank = 1000; j = 1; second_bank = 1000; k = 1; while first_bank < 50000 first_bank = 1000 + first_bank*1.055; j = j+1; end while second_bank < 50000 second_bank = 1000 + second_bank*1.045; k = k + 1; end fprintf('It would take the second bank %d years more than the first bank. ',(k-j));
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote