I'm working on a retirement portfolio code which involves inflation adjusted withdrawals. What I'm trying to achieve here is a series of these to subtract from the portfolio later. 1:20 are essentially years 1:20 the portfolio. Each year, the withdrawal amount is = previous year's withdrawal amount * (1+inflation rate). Trying to formulate this but not getting the output. Any help would be appreciated!
Inipot = 200000; %The initial amount invested
Withd = 0.04; %The withdrawal rate
Infrate = 0.03;%Inflation rate
A= Inipot*Withd ; %Withdrawal amount
for idx = 1:20, if idx ==1 out = A; else out(idx) =[(1+Infrate)* A(idx-1)] end end
Best Answer