@Veenty wrote:
So I have the following code
function CC_trap(X::Array{Float64,2}, tag::Int64) a = 0.0 for i=1:size(X)[1] for j=1:size(X)[2] global a += weights_CC[i]*X[i,j] end end a = result_integral*Parameters.dv[tag] end
But I’m getting the error
syntax:global a
: a is a local variable in its enclosing scopeWhat would be the proper Julia way of doing this?
Posts: 3
Participants: 3