Tag Info

Hot answers tagged

7

With eqn[{k_, r_, H0_, P0_}] := {H'[t] == r (1 - H[t]/k) - d H[t] P[t], P'[t] == -s P[t] + e H[t] P[t], H[0] == H0, P[0] == P0} d = 0.01; s = 0.3; e = 0.02; I would define one simulation as sim := Module[ {k = RandomVariate[NormalDistribution[150, 20]], r = RandomVariate[NormalDistribution[0.4, 0.003]], H0 = RandomVariate[UniformDistribution[{50, ...


2

Using sim[length_] := Module[{rv = RandomVariate[BetaDistribution[2, 1], length], y, yMed}, y[1] = First@rv; yMed[t_Integer] := yMed[t] = Median[y /@ Range[t]]; y[t_Integer] := y[t] = f[0.5, {rv[[t]], yMed[t - 1]}]; yMed /@ Range[length] ] results in plots like Here Median[y /@ Range[t]] calculates the median for y[1] to y[t], as stated ...



Only top voted, non community-wiki answers of a minimum length are eligible