Skip to content

Instantly share code, notes, and snippets.

@mg
Created June 29, 2014 16:12
Show Gist options
  • Save mg/46ce2b972a42311ab520 to your computer and use it in GitHub Desktop.
Save mg/46ce2b972a42311ab520 to your computer and use it in GitHub Desktop.
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