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 Kommentar

dpb
dpb am 2 Jul. 2014
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...

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Powertrain Blockset finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 2 Jul. 2014

Kommentiert:

dpb
am 2 Jul. 2014

Community Treasure Hunt

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

Start Hunting!

Translated by