Created
June 29, 2014 16:12
-
-
Save mg/46ce2b972a42311ab520 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Output(A::Float64, L::Float64, K::Float64, b::Float64) | |
return A * K^b * L^(1-b) | |
end | |
function Invest(O::Float64, s::Float64) | |
return s * O | |
end | |
function Machines(M::Float64, I::Float64, d::Float64) | |
return M + I - d*M | |
end | |
function Run( | |
A::Float64, | |
L::Float64 , | |
K::Float64, | |
b::Float64, | |
s::Float64, | |
d::Float64, | |
Runs::Integer | |
) | |
O= Array(Float64, Runs) | |
for i = 1:Runs | |
O[i]= Output(A,L,K,b) | |
I= Invest(O[i],s) | |
K= Machines(K,I,d) | |
end | |
return O | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment