Question: 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

 This answer must be completed in R programming language #Set number

#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 error

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!