I will receive 100 units, 200 units and 50 units at the end of this year, and at the end of the next 2 years. If the discount rate is 10%, this is equivalent to receiving immediately the amount of:
>

$\mathrm{with}\left(\mathrm{finance}\right)\:$

>

$\mathrm{cashflows}\left(\left[100\,200\,50\right]\,0.1\right)$

If these cash flows are generated from an initial investment of 95 units, the net present value is
>

$95\+\mathrm{cashflows}\left(\left[100\,200\,50\right]\,0.1\right)$

Since the net present value (npv) is positive, the project would be accepted on that basis.
What is the internal rate of return?
>

$\mathrm{npv}\u225495\+\mathrm{cashflows}\left(\left[100\,200\,50\right]\,r\right)$

${\mathrm{npv}}{\u2254}{}{95}{\+}\frac{{100}}{{r}{\+}{1}}{\+}\frac{{200}}{{\left({r}{\+}{1}\right)}^{{2}}}{\+}\frac{{50}}{{\left({r}{\+}{1}\right)}^{{3}}}$
 (3) 
>

$\mathrm{fsolve}\left(\mathrm{npv}\=0\,r\,0..2\right)$

The internal return is 115%. Since this is bigger than the discount rate the project would be also be accepted on the IRR basis. One can see the npv versus rate by plotting
>

$\mathrm{plot}\left(\mathrm{npv}\,r\=0..2\right)$

It is prudent to do this plotting, since it is possible to have multiple solutions to the IRR relationship (npv=0).