There seems to be an interesting change between v0.4.5 and v0.5. Take a
look at the following code:
if largeFluctuations
function σ(y,t)
dσ = zeros(19)
dσ[1] = noiseLevel*1.5y[1]
dσ[18]= noiseLevel*6y[18]
return(dσ)
end
else
function σ(y,t)
dσ = zeros(19)
dσ[1] = 0.02y[1]
dσ[16]= 0.02y[16]
dσ[18]= 0.2y[18]
dσ[17]= 0.02y[17]
return(dσ)
end
end
In v0.4.5, this would work as expected: if largeFluctuations was set to
true, then you would get the first function and if false the second. In
v0.5, I tracked down to this error where it will always define sigma as the
second function.
Is this change intentional? If so, why?
Is the proper way to do this in v0.5 using anonymous functions? I know
there was a change to faster anonymous functions, but is it as fast as
regular function, or are there some notable differences?