Explore BrainMass

Explore BrainMass

    Writing MATLAB M-file

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Write M-file to calculate the future value of an initial investment, or the amount that needs to be deposited annually to reach future investment goal. This program is to be written as a single M-file that uses as interrogatory input statement to determine which calculation to perform. The equations required:

    F=I(1+r/n)^(nM) Future Value-Initial Investment

    F=A(1+r)[(1+r)^M-1/r] Future Value-Annual Invest.

    F=Future Value
    I=Initial Investment
    r=Annual Interest Rate
    n=Compounding Periods/year
    M=Number of Years
    A=Amount Deposited at Beginning of Each Year

    This is to be only 15 lines or so - no more please.

    © BrainMass Inc. brainmass.com December 24, 2021, 4:59 pm ad1c9bdddf

    Solution Summary

    Solution for the asked problem with necessary codes.