How to write the bond valuation formula?

Hi,
How can i type the bond valuation formula into a script of MATLAB? The formula is: http://www.e-financialmanagement.net/bond-valuation/bond-valuation/
Thanks in advance!

1 Comment

What have you tried? It's simply a few levels of parentheses to group terms properly and appropriate use of the element-by-element operators to enable it to be vectorized ("dot" operators).
For efficiency it'd be good to compute the (1+y).^n term only once and use that result (and the above expression is a big_hint (tm) for the kind of thing you'll need to do...
So, let's see some effort first and we'll guide along the way where you're stuck...

Sign in to comment.

Answers (0)

Categories

Find more on Powertrain Blockset in Help Center and File Exchange

Asked:

on 2 Jul 2014

Commented:

dpb
on 2 Jul 2014

Community Treasure Hunt

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

Start Hunting!