Skip to main content

Posts

Showing posts with the label account

Total Amount after n years - bank interest calculation using Matlab

Problem If a certain amount of money (called the principal P ) is invested in a bank account, earning an interest rate i compounded annually, the total amount of money Tn that will be in the account after n years is given by: T n = P(1+i) n Write a function that will receive input arguments for P, i, and n, and will return the total amount of money T n . Also, give an example of calling the function. Solution The above problem has been taken from the book Practical introduction to Matlab Programming by Stormy Attway . This is a very good book and a must read for every matlab programmer who wants to become a professional. This book is also for beginners if you want to start from scratch and become a professional. I think the question is very explanatory by itself so that I don't have to give you explanation about the same. If you want to know more about the money deposited(principal) , interest , total amount then you can go here: Interest rate - Wikipedia . This pr...