Thursday, March 31, 2011

Matlab function question?

I'm having trouble creating a function in matlab basically it's a fucntion that tells you how much your annual payment for a loan should be if you have inital loan amount =p, interest rate= i and number of payments= n. with the function being A=(p*i*(1+i)^n)/(((1+i)^n)-1). now by itself this is easy enough for me but the problem is n is an array from 1 to 5 and the answer has to spit out array the shows the annual payment corresponding to each n value i can get it to work if i simply set n to be equal to a value but not when it's an array help please!!!

No comments:

Post a Comment