I am very new to Julia. I am trying to solve a system of nonlinear equations to find a vector (p_new). Below a simplified version of my problem. The issue is that I get this message: "ERROR: MethodError: no method matching zero(::, Type{Any})". I am not sure whether it is because the initial conditions are not well defined. Thanks in advance!
p_1 = [ 1, 2, 2.3]
p_1b = [ 1, 2.2, 2.5]
mgc = [1, 1, 0.5]
theta = 0.8
OW1 = [0 1 0; 1 1 1; 0 0 1]
g = ones(3,1)
function pupdate!(p_1,mgc,theta,OW1)
delt = p_1.*theta
delt = 2.718281828459.^delt
Sp1 = sum(delt)
sp1 = delt./Sp1
markup = p_1 .- mgc
sp1 .= markup
end
g0 = [p_1b, mgc, theta, OW1]
p_new = nlsolve(pupdate!, g0)