Need to implement a parameter that grows at a specific rate over time
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
The context is a computational general equilibrium (economic) model
I want to have a parameter that is geometric growth.
The growth in time is G(+1) = (1+I)*G, however, I don't know how to set the value of G at t=0?
(I is percent growth of G for each time period)
I looked in help and found the following equation form
y=C*exp(k*t)
where C is the value of y at t=0 and k can be derived by knowing the value of y at a different time
However, I'm a nube and I'm not sure how to implement this equation in the context of my model.
2 Kommentare
Antworten (1)
Star Strider
am 27 Apr. 2022
Perhaps this —
G0 = 2;
I0 = 0.3;
Gfcn = @(t,G,I) G.*(1+I).^t;
t = linspace(0,5, 25);
figure
plot(t, Gfcn(t,G0,I0))
grid
xlabel('t')
ylabel('G(t)')
.
4 Kommentare
Siehe auch
Kategorien
Mehr zu Octave finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
