Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This answer must be completed in R programming language #Set number of time steps and initialize variable max.step=120 x=numeric(max.step) #creates an array with max.step entries
This answer must be completed in R programming language
#Set number of time steps and initialize variable max.step=120 x=numeric(max.step) #creates an array with max.step entries
#Set parameter for compound interest problem r=0.05 #interest rate
#Set intial condition x[1]=1000 for (t in 1:(max.step-1) ) { x[t+1]=x[t]*(1+r/12) }
#Generate plot of solution months=1:max.step #create array of months plot(months,x,type="l") #plot solution (type="l" makes a line plot)
Problem 1: Modify the program discrete.R to compute the balance of a loan over a 5 year (60 months). Assume that interest is compounded monthly and payments are monthly. Problem 2: Use the code you just created to compute the payment required to pay off a $30,000 loan with 6% interest in 5 years. This process will require trial and error. Your payment only needs to be accurate to nearest whole dollar amount. You can use trial and error. Problem 1: Modify the program discrete.R to compute the balance of a loan over a 5 year (60 months). Assume that interest is compounded monthly and payments are monthly. Problem 2: Use the code you just created to compute the payment required to pay off a $30,000 loan with 6% interest in 5 years. This process will require trial and error. Your payment only needs to be accurate to nearest whole dollar amount. You can use trial and errorStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started