I am missing something as what I had hoped was a matrix seems to be a vector. Continuing from my topic here
My code is
using Distributions
#Constants
Ropt = 100
γ= 2
k = 8.6173324e-5 #Boltzman eV/K
T0 = 273.15 #K
Temp = 293.15 # example of 20 C degrees
q = 1.2 #Hill exponent
m = sort(rand(Uniform(10^2, 10^12), 50))
#L is the success curve of consumers aka feeding efficiency, a probability matrix
L = @. (m/m'*Ropt * exp(1-m/m'*Ropt))^γ # The @. macro here broadcasts the following scalar expression across `m` and `m'`
# Weak links (Lij <p) are removed
L[L .< 0.01] .= 0 # . lets you do things element by element in an array
#create a matrix of links:
#take the link probabilities of the previous matrix and determine if L[i,j] > p
FoodWeb = rand(Uniform(0,1), size(L)...) #what does ... do? This is impossible to search in the Julia documentation
FoodWeb[L .> FoodWeb] .= 1 # Sets F[i,j] = 0 wherever L[i,j] < F[i,j]
FoodWeb
function ParameterMatrix(m, I, b, c, E)
x = exp(I)*m^b*m'^c*exp((E*(T0 - Temp))/(k*T0*Temp))
end
#attack rate a (m^2/s)
a = @. ParameterMatrix(m, -13.1, 0.25, -0.8, -0.38)
where
julia> a
50-element Array{Float64,1}:
instead of being a 50x50 matrix. What am I doing incorrectly?