Compounding matlab example.