xnpv
Net present value with irregular cash-flow dates.
Syntax
Section titled “Syntax”v = xnpv(rate, values, dates)Description
Section titled “Description”Like npv but cash flows can occur at arbitrary dates. dates is a date vector matching values; the first date is the reference (period zero).
Example
Section titled “Example”xnpv(0.09, [-10000 2750 4250 3250 2750], [...])