08.07.2015 Views

Introduction to MATLAB 7 for Engineers Chapter 1 An ... - FET

Introduction to MATLAB 7 for Engineers Chapter 1 An ... - FET

Introduction to MATLAB 7 for Engineers Chapter 1 An ... - FET

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Example of a while LoopDetermine how long it will take <strong>to</strong> accumulate at least$10,000 in a bank account if you deposit $500 initiallyand $500 at the end of each year, if the account pays 5percent annual interest.amount = 500; k=0;while amount < 10000k = k+1;amount = amount*1.05 + 500;endamountkThe final results are amount = 1.0789e+004, or $10,789,and k = 14, or 14 years.1-55More? See pages 48-51.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!