I do not know how to set this problem up.

1 view (last 30 days)
shelby mcgowan
shelby mcgowan on 25 Jul 2016
Answered: Div Tiwari on 9 Aug 2016
Use the meshgrid function to determine all the possible amount that could be in your account at the end for 10 years given the following investments ($1000, $2000, $3500, $1500, $500) and the interest rates (0.15, 0.20, 0.1)
  1 Comment
Walter Roberson
Walter Roberson on 25 Jul 2016
How would you write the equation for one investment amount at one interest rate for 10 years?

Sign in to comment.

Answers (1)

Div Tiwari
Div Tiwari on 9 Aug 2016
Looking at the syntax of the 'meshgrid' should provide a hint. Consider
[X,Y] = meshgrid(xgv,ygv)
You may use the principal amounts as one input vector, and for the other, you could provide a vector containing the factor by which an amount would grow in 10 years under each of the given rates. Compare the output matrices to determine the final step(s).
As an aside, the same output can be obtained directly with a single matrix multiplication as well.

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!